Is there any way of specifying session timeout in Spring? I can not specify it in web.xml. As I am using session scope bean in controller as follows
I have configured controller through spring xml files.
class xyzController{
ABCSessionScopeClass objectWhichWillBeStoredInSession;
}
I can not use this either
session.setMaxInactiveInterval(60*60);
Is there any other way of doing this. I don’t mind setting timeout per session or for all session at the same time.
I was not able to find any way to specify session timeout value through any Spring configuration files. I was using
<aop:scoped-proxy>bean so that I don’t have to manage read/write value/object to session. Now, I also want the same for setting session timeout value, without using servlets API. But looks like there is no way to specify it other than web.xml file. So ended up using servlet apirequest.getSession()to set timeout period. I externalized time value so that I can easily change it without recompiling the code. If anyone found better approach then please feel free to post. If found better, I can accept that as an answer.