Reputation: 2814
I have set the timeout to 30 mins in web.xml and have successfully deployed the webapp in WebLogic. Now the app is up and running but when the max inactive interval reaches, the session doesn't timeout. This same app is timing out in tomcat properly.
Can anyone please suggest some idea?
Also I want to know whether there is an app specific weblogic.xml? If yes, then where do I find it?
Upvotes: 4
Views: 31876
Reputation: 718
A couple of options you have:
You can edit the File web.xml: Edit the session-timeout of the session-config in the file web.xml. Please note in web.xml, the session timeout is set in minutes.
<session-config>
<session-timeout>60</session-timeout>
</session-config>
You can edit the File weblogic.xml: Edit the session-param TimeoutSecs in the file weblogic.xml. In weblogic.xml, the session timeout is set in seconds.
<session-descriptor>
<session-param>
<param-name>TimeoutSecs</param-name>
<param-value>3600</param-value>
</session-param>
</session-descriptor>
Note that the timeout value set in web.xml takes precedence over weblogic.xml. If you don't set any values in web.xml, weblogic.xml takes over. A good approach to handle session timeout is setting this just on web.xml itself since web.xml takes precedence over application server’s deployment descriptors.
For more information refer to : http://download.oracle.com/docs/cd/E15523_01/web.1111/e13712/web_xml.htm#i1023849
Hope this helps.
Upvotes: 2
Reputation: 195029
well the session timeout setting in both web.xml and weblogic.xml should work. pls note that the unit in web.xml is minute, but in weblogic.xml is second.
And the timeout setting in web.xml takes precedence over weblogic.xml.
weblogic.xml should be under WEB-INF/
for session-descriptor in weblogic.xml:
http://docs.oracle.com/cd/E13222_01/wls/docs92/webapp/weblogic_xml.html#wp1071982
Upvotes: 1