Code example:

    private static void setSessionTimeout(int seconds) {
        HttpSession session = getHttpSession();
        if (session != null) {
            session.setMaxInactiveInterval(seconds);
        }
    }

    private static HttpSession getHttpSession() {
WebRequest request = (WebRequest) WebRequestCycle.get().getRequest();
        return request.getHttpServletRequest().getSession();
    }


// Daniel
jalbum.net


On 2008-09-26, at 14:34, Nino Saturnino Martinez Vazquez Wael wrote:

I mean the method on the ordinary java session

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSession.html

You can get that from the wicket session... Or request cycle... I cant remember..

Stefan Lindner wrote:
I forgut to tell you that I use Wicket 1.4 M3. I can't see any settimeout-Method in Session.

Stefan

-----Ursprüngliche Nachricht-----
Von: Nino Saturnino Martinez Vazquez Wael [mailto:[EMAIL PROTECTED] ] Gesendet: Freitag, 26. September 2008 12:59
An: [email protected]
Betreff: Re: Individual session timeout

session.settimeout() ?

Stefan Lindner wrote:

The global session timeout for all sessions can be set in the web.xml
file. Is it possible to set an individual session timeout for each
session? E.g. depending on the user's role?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to