cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Forge <fo...@neonics.com>
Subject different browsersessions share same instantiation?
Date Thu, 10 May 2001 09:29:13 GMT

Hi there,

Why are class-level variables shared among different browser sessions?

When I put code like


	if (session==null)
		session=request.getSession();

in my xsp page, and I log in to my page and enter some data that is
stored in the session, someone else can open the same page on another
computer and see what I've entered. It seems that the generated
classfile is loaded once (not indicated by the logs, though), 
and is shared among all the connections made to Tomcat.

When i remove the if-clause all works fine, but it still strikes
me as a little bit odd, since for instance JServ does not have
this problem. When I close the browser and re-enter a site that
is servlet based with jserv, the session is lost. With cocoon/tomcat
however, the session is kept. (at least the xsp-page class
is kept in memory and is served to whoever asks for that page next).

Why, o why?

Greetings,

	Kenney



---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message