You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Sayre <ri...@gmail.com> on 2007/11/20 19:45:10 UTC

Struts 2 Session Timeout

I noticed while developing my application that Struts 2 (I think) will
recreate your session when it times out.

I have several name spaces used in my packages such as:

1.  /Admin
2. /Design
3. /

While I am hitting actions in the /Admin or /Design area of my
application, if the session times out I am redirected back to my main
page with a restored session.  If any of the link point to / then the
session does not get restored.

How can I restore the session in the / name space?  Is there any
reason why this is not happening for the / name space?

Thank you

Rich

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


Re: Struts 2 Session Timeout

Posted by j alex <st...@gmail.com>.
>> Struts 2 (I think) will recreate your session when it times out.

I assume that you mean Struts 2 will create a fresh session, but not have
any values in it.

Did you find why this is happening and any workaround ? - seems i'm facing
the same issue.

What's the best way to detect that the session has timed out ? - i'm using
setMaxInactiveInterval() in an interceptor when the session.isNew() and want
to redirect the user to a timed-out page if any action is accessed after the
max interval.

Thanks,
Joseph

On Nov 20, 2007 1:45 PM, Richard Sayre <ri...@gmail.com> wrote:

> I noticed while developing my application that Struts 2 (I think) will
> recreate your session when it times out.
>
> I have several name spaces used in my packages such as:
>
> 1.  /Admin
> 2. /Design
> 3. /
>
> While I am hitting actions in the /Admin or /Design area of my
> application, if the session times out I am redirected back to my main
> page with a restored session.  If any of the link point to / then the
> session does not get restored.
>
> How can I restore the session in the / name space?  Is there any
> reason why this is not happening for the / name space?
>
> Thank you
>
> Rich
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>