You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Al Sutton <al...@alsutton.com> on 2008/01/16 10:14:30 UTC

Dynamic session timeout

Heres a problem people may want to take a crack at...

In one of my webapps I allow the admin users to set how long a users session 
is valid for, in a servlet I can set this by doing 
session.setMaxInactiveInterval when the user logs in, but can I do this in a 
struts action? 


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


Re: Dynamic session timeout

Posted by Al Sutton <al...@alsutton.com>.
Thanks for the tip, I'd come to a similar solution (using 
ServletRequestAware), but it feels iffy having to got back to the 
ServletRequest object.

Al.

----- Original Message ----- 
From: "Andrea Vettori" <ma...@andreavettori.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Wednesday, January 16, 2008 9:23 AM
Subject: Re: Dynamic session timeout


>I do that with
>
>  ServletActionContext.getRequest().getSession().setMaxInactiveInterval
>
>
> Hope this helps
>
>
> Il giorno 16/gen/08, alle ore 10:14, Al Sutton ha scritto:
>
>> Heres a problem people may want to take a crack at...
>>
>> In one of my webapps I allow the admin users to set how long a users 
>> session is valid for, in a servlet I can set this by doing 
>> session.setMaxInactiveInterval when the user logs in, but can I do  this 
>> in a struts action?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
> --
> Ing. Andrea Vettori
> Consulente per l'Information Technology
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


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


Re: Dynamic session timeout

Posted by Andrea Vettori <ma...@andreavettori.com>.
I do that with

  ServletActionContext.getRequest().getSession().setMaxInactiveInterval


Hope this helps


Il giorno 16/gen/08, alle ore 10:14, Al Sutton ha scritto:

> Heres a problem people may want to take a crack at...
>
> In one of my webapps I allow the admin users to set how long a users  
> session is valid for, in a servlet I can set this by doing  
> session.setMaxInactiveInterval when the user logs in, but can I do  
> this in a struts action?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>

--
Ing. Andrea Vettori
Consulente per l'Information Technology


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