cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KUMAR,PANKAJ (HP-Cupertino,ex1)" <pankaj_ku...@hp.com>
Subject An observation on using session logicsheet ...
Date Mon, 02 Jul 2001 16:51:40 GMT
Hi,

I observed the following while using C2beta1 session logicsheet ( WindowsNT,
Tomcat 3.2.1 ):

Use of statement " <session:set-attribute
name="app-name"><xsp:expr>"Something"</xsp:expr></session:set-attribute>"
in
an XSP page causes a NullPointerExcpetion at execution time. However,
preceding this statement with statement "<session:get-id as="xml"/>" gets
rid of the exception ( this is my current workaround).

While browsing the generated code and Cocoon source code for
XSPRequestHelper.java and Request.java, I realized that "<session:get-id
as="xml"/>" causes Request.getSession() to be called that creates the
session, whereas " <session:set-attribute
name="app-name"><xsp:expr>"Something"</xsp:expr></session:set-attribute>"
causes Request.getSession(false) to be called that doesn't create the
session.

As I don't see any specific tag in session logicsheet for creating a
session, this may be a bug.

"Session Logicsheet" documentation talks of attribute "create-session" in
<xsp:page> tage but it didn't seem to work. I don't see this attribute being
used in XSP logicsheet "xsp.xsl" anyway !!

A plausible solution would be to introduce a tag <session:create-session/>
or a pair <session:create-session/> and <session:destroy-session/>

Pankaj.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message