tags:

views:

262

answers:

3

I have a wicket Project and My page is Expiring so fast. why?

+2  A: 

I assume that by "My page is Expiring" you mean that the session is expiring? If so, you can increase the session-timeout in the web.xml of your project:

<session-config>
        <session-timeout>30</session-timeout>
</session-config>

The timeout is specified in minutes.

jsight
A: 

in web.xml increase the session timeout 30 is 30 minutes increase the time as 200 session-config> 30

chandrasekar
A: 

You can also do this programatically, by getting the HttpSession of the request and setting MaxInactiveInterval.

Integer timeoutInMinutes = 20;
Request request = RequestCycle.get().getRequest();
if( request instanceof WebRequest )
{
    WebRequest wr = (WebRequest)request;
    HttpSession session = wr.getHttpServletRequest().getSession();
    if( session != null ) {
        session.setMaxInactiveInterval(timeoutInMinutes*60);
    }
}
Matt