cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konstantin Piroumian" <KPiroum...@flagship.ru>
Subject Re: Can't forward a request with a RequestDispatcher
Date Thu, 19 Oct 2000 15:17:51 GMT
Hope that adding create-session='true' attribute to xsp:page will solve your
problem:
<xsp:page create-session='true' ...>

I had similar problem.
It was the session object that was null.
I don't know why is it so, but it seems that session object is not created
sometimes even if create-session is set to true.
I don't remember what did I change (maybe the order of taglib xmlns-es) and
it works now.
Try to check the session object.

----- Original Message -----
From: "Bob Fellenz" <BFellenz@mmrd.com>
To: <cocoon-users@xml.apache.org>
Sent: 19 ??????? 2000 ?., ??????? 18:47
Subject: Can't forward a request with a RequestDispatcher


> I'm attempting to forward a request through XSP with a RequestDispatcher,
but I'm getting a NullPointerException.  Can anyone give me a clue as to
what I'm doing wrong?
>
> xml file:
> <?xml version="1.0"?>
> <?cocoon-process type="xsp"?>
>
> <xsp:page language="java"
>     xmlns:xsp=" http://www.apache.org/1999/XSP/Core
<http://www.apache.org/1999/XSP/Core> "
> >
>
> <DOCUMENT>
>   <xsp:logic>
>   if (session.getAttribute("LOGIN") == null) {
>       RequestDispatcher dispatcher = request.getRequestDispatcher("
http://www.yaho <http://www.yaho> o.com/");
>       if(dispatcher!=null){
>         dispatcher.forward(request, response);
>       }
>   }
>   </xsp:logic>
> </DOCUMENT>
> </xsp:page>
>
> Exception stack trace:
>
> java.lang.NullPointerException:
> at
_usr._local._apachemm._tomcat._webapps._cocoon._servlets._waldo._rx.populate
Document(_rx.java:81)
> at org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:96)
> at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:494)
> at org.apache.cocoon.Engine.handle(Engine.java:359)
> at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
> at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
> at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
> at java.lang.Thread.run(Thread.java:475)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


Mime
View raw message