How to set HttpSession time out in JBoss
| July 12th, 2010There are 3 ways to change HttpSession time out in Jboss.
- 1) To change the global default HttpSession of Jboss. (This will effect to every web app that running in the Jboss AS
In Jboss 5: Edit deployers/jbossweb.deployer/web.xml
In Jboss 4.3: Edit deploy/jboss-web.deployer/conf/web.xml
Earlier Versions: Edit deploy/jbossweb-tomcat55.sar/conf/web.xml
<session-config>
<session-timeout>30</session-timeout>
</session-config>
- 2) To change default HttpSession per web application
Add the same tag above in WEB-INF/web.xml
If the timeout value is 0, it means session never time out.
- 3) To override the Global and Web App value for a single client
Call HttpSession.setMaxInactiveInterval(int seconds)



