Pages expire very quickly in Wicket

I have a Wicket app and my pages are expiring very quickly. Why is this, and what can I do about it?

+4
source share
3 answers

I assume that by β€œMy Page Expires” do you mean that the session expires? If so, you can increase the session timeout in the web.xml of your project:

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

Timeout is in minutes.

+12
source

You can also do this programmatically by receiving an HttpSession 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); } } 
+2
source

In web.xml increase the session timeout from 30 minutes to 200 minutes, as shown below:

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

should become

 <session-config> <session-timeout>200</session-timeout> </session-config> 
0
source

All Articles