You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christoph Stocker <ch...@gmx.at> on 2002/06/05 10:18:22 UTC
access session in xsp
hi!
i use weblogic6.0sp2, cocoon2.0.2 and win2000
i want to access the session in an xsp.
<xsp:page
language="java"
xmlns:xsp="http://apache.org/xsp"
xmlns:xsp-session="http://apache.org/xsp/session/2.0"
>
<xsp:logic>
org.apache.cocoon.environment.http.HttpSession session =
(org.apache.cocoon.environment.http.HttpSession)request.getSession();
String foo = (String)session.getAttribute("errorData");
<xsp:logic>
.
.
.
</xsp:page>
but i always get the following error-message (also if
i comment the line --> String foo =
(String)session.getAttribute("errorData");
Language Exception
More precisely:
org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error while
instantiating org\apache\cocoon\www\registrierung\error_xsp:
java.lang.NullPointerException
any idea
greetings, chris
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: access session in xsp
Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Christoph Stocker [mailto:chris.stocker@gmx.at]
>
> hi!
>
> i use weblogic6.0sp2, cocoon2.0.2 and win2000
>
> i want to access the session in an xsp.
>
>
> <xsp:page
> language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:xsp-session="http://apache.org/xsp/session/2.0"
> >
>
> <xsp:logic>
This is page 'global' context - Java code goes into class itself.
> org.apache.cocoon.environment.http.HttpSession session =
>
> (org.apache.cocoon.environment.http.HttpSession)request.getSession();
'request' variable here is not initialized yet.
You have to put this block inside document tag.
Vadim
> String foo = (String)session.getAttribute("errorData");
> <xsp:logic>
> .
> .
> .
>
> </xsp:page>
>
>
> but i always get the following error-message (also if
> i comment the line --> String foo =
> (String)session.getAttribute("errorData");
>
>
> Language Exception
>
> More precisely:
>
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error while
> instantiating org\apache\cocoon\www\registrierung\error_xsp:
> java.lang.NullPointerException
>
>
> any idea
>
> greetings, chris
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>