You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Laurie Harper <la...@holoweb.net> on 2008/07/02 21:09:07 UTC

Re: [s] Validity of user session

Milan Milanovic wrote:
> I have an SessionAware-based action class, where I put some variables into
> session when user came to the page which is backed up with that action
> class. I'm wondering what is validity of that session object, because I'm
> not sure if I have possibility to clear user session ? So I need to know
> when session will be deleted with all its objects inside ? When user go to
> some other page which is not backed-up with this class or some other action
> class ?

I'm not sure I understand your question. The session you access through 
SessionAware is the standard Servlet API session, which lasts for as 
long as the user remains active in the application. If you want to store 
data only until the next request, use request scope instead of session 
scope.

L.


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


Re: [s] Validity of user session

Posted by dusty <du...@yahoo.com>.
Don't you just overwrite the existing session values (that were left behind
because the user didn't click exit) when the user returns to the page?  

You can tell the browser not to cache the page with the http equiv header
tags.



Milan Milanovic wrote:
> 
> O.K. Could you tell me very session data is stored ? I need to know this
> because when user came to one page I fill session object with some values
> (collections), and when he click "exit" link then I clear session
> contents, but he may click to some other link (to "exit") and then all
> objects in session will stay there until he came again to that page and
> when I resend data in his session.
> 
> But, there is another problem which I've been talked about (but nobody
> anwsered :-(, is that when he cam again to my page, action class method is
> not fired at all, but whole page is called from some IE cache.
> 
> --
> Thx, Milan 
> 
> 
> 
> 
> Laurie Harper wrote:
>> 
>> Milan Milanovic wrote:
>>> I have an SessionAware-based action class, where I put some variables
>>> into
>>> session when user came to the page which is backed up with that action
>>> class. I'm wondering what is validity of that session object, because
>>> I'm
>>> not sure if I have possibility to clear user session ? So I need to know
>>> when session will be deleted with all its objects inside ? When user go
>>> to
>>> some other page which is not backed-up with this class or some other
>>> action
>>> class ?
>> 
>> I'm not sure I understand your question. The session you access through 
>> SessionAware is the standard Servlet API session, which lasts for as 
>> long as the user remains active in the application. If you want to store 
>> data only until the next request, use request scope instead of session 
>> scope.
>> 
>> L.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-s2--Validity-of-user-session-tp18197953p18298677.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: [s] Validity of user session

Posted by Milan Milanovic <mi...@yahoo.com>.
O.K. Could you tell me very session data is stored ? I need to know this
because when user came to one page I fill session object with some values
(collections), and when he click "exit" link then I clear session contents,
but he may click to some other link (to "exit") and then all objects in
session will stay there until he came again to that page and when I resend
data in his session.

But, there is another problem which I've been talked about (but nobody
anwsered :-(, is that when he cam again to my page, action class method is
not fired at all, but whole page is called from some IE cache.

--
Thx, Milan 




Laurie Harper wrote:
> 
> Milan Milanovic wrote:
>> I have an SessionAware-based action class, where I put some variables
>> into
>> session when user came to the page which is backed up with that action
>> class. I'm wondering what is validity of that session object, because I'm
>> not sure if I have possibility to clear user session ? So I need to know
>> when session will be deleted with all its objects inside ? When user go
>> to
>> some other page which is not backed-up with this class or some other
>> action
>> class ?
> 
> I'm not sure I understand your question. The session you access through 
> SessionAware is the standard Servlet API session, which lasts for as 
> long as the user remains active in the application. If you want to store 
> data only until the next request, use request scope instead of session 
> scope.
> 
> L.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-s2--Validity-of-user-session-tp18197953p18260191.html
Sent from the Struts - User mailing list archive at Nabble.com.


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