java - Wicket Apache get tomcat session setted time -


i'm trying send user message/popup when thier session expires. problem have have set session time out time in tomcat settings, can't find way how time left of tomcat session. found way's set/make yourself, that's want.

you should able use httpsession.getmaxinactiveinterval()

to access httpsession can use:

    ((httpservletrequest) getrequest().getcontainerrequest()).getsession();      ((httpservletrequest) requestcycle.get().getrequest().getcontainerrequest()).getsession(); 

keep in mind session timer reset once user sends request. ajax functionality wouldn't make sense. additionally session invalidated before inactive timer runs out (typically in login/logout scenario).


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -