You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Heligon Sandra <sa...@thomson.net> on 2003/02/27 14:36:10 UTC

Question about Struts and HttpSession management

	I know the definition of a HttpSession but I don't understand well
how
	this object is managed ?
	Who is responsible for the creation of the HttpSession ?
	If two clients use the same machine did they share the same
HttpSession ?
	If two web browsers are opened on the same machine, did they use the
same HttpSession ?
	I don't understand well the creation or delete of an HttpSession ?
when did they occur ?
	The delete of the HttpSession is done when the servlet engine is
killed, or when the session
	timeout is reached. But are they others reasons ?
	Nothing is specific to Struts for the HttpSession delete, isn't it ?
	Concerning the creation of the HttpSession and the association with
a specific user or machine
	I don't understand large time there.
	Is Struts there for something? 

	

 

----------------------------------------------------------- 
As of February 12, 2003 Thomson unifies its email addresses on a worldwide
basis.Please note my new email address: sandra.heligon@thomson.net 

Thomson is the leader in solutions and technologies for the entertainment
and media industries and serves its customers under its four strategic
brands: Technicolor, Grass Valley, RCA and THOMSON. 
More about Thomson: http://www.thomson.net/videochain 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Question about Struts and HttpSession management

Posted by Michael Hanisch <mh...@redhat.com>.
On Thu, 2003-02-27 at 14:36, Heligon Sandra wrote:


I realize that this was sent a long time ago, but as I haven't seen any
other replies I figured that I might just as well say something...

> 
> 	I know the definition of a HttpSession but I don't understand well
> how
> 	this object is managed ?
> 	Who is responsible for the creation of the HttpSession ?
The Servlet container.

> 	If two clients use the same machine did they share the same
> HttpSession ?
No, usually not.

> 	If two web browsers are opened on the same machine, did they use the
> same HttpSession ?
Depends.
Your session could be tied to a cookie, in which case two browsers
probably won't share the session (usually you have separate cookies for
each browser instance, i.e. process, but that depends on the browser).

If you just open another browser window chances are that cookies are
shared between those windows; depends on the browser, though.

Your session could be tied to the URL (i.e., the session ID is part of
the URL), in which case the session would be shared when using the same
URLs, no matter if you're using a different browser, different machine
etc.


> 	I don't understand well the creation or delete of an HttpSession ?
> when did they occur ?
Check the servlet spec.

> 	The delete of the HttpSession is done when the servlet engine is
> killed, or when the session
> 	timeout is reached. But are they others reasons ?
Session could have been invalidated manually.

> 	Concerning the creation of the HttpSession and the association with
> a specific user or machine
> 	I don't understand large time there.
> 	Is Struts there for something? 
What exactly do you mean?

Hope this clarified things a bit,

	Michael.

-- 
Michael Hanisch                                      mhanisch@redhat.com
Red Hat - RH Interchange Inc., Orleansstrasse 4,  D-81669 Munich/Germany
phone: +49 (0)89 206058-53                      fax: +49 (0)89 206058-88


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org