How to configure default HTTP Session Timeout on EAP 7
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 7.x
Issue
- How to configure HTTP Session Timeout on EAP 7.
- How can we configure Default session timeout by admin-console.
- I would like to know where the attribute "default-session-timeout" should be defined by CLI.
Resolution
We can configure a container default session timeout by changing the attribute default-session-timeout (30 minuites by default) through admin-console or JBoss-CLI.
Admin-console
- login to admin-console,
- go to "Configuration: Subsystems" -> "Subsystem: Web/HTTP" -> "Undertow Settings: Servlet/JSP"
- "Default session timeout" will show a current value of the attribute
default-session-timeout - Click the [Edit] button and specify the value of "Default session timeout". Then click the save button. This change will be effective after the reloading server.
JBoss-CLI
-
Execute the following command in
jboss-cli.shto get a current value of the attributedefault-session-timeout:/subsystem=undertow/servlet-container=default:read-attribute(name=default-session-timeout) -
Execute the following command in
jboss-cli.shto modify the attributedefault-session-timeoutas documented in 17.9. Configuring HTTP Session Timeout:/subsystem=undertow/servlet-container=default:write-attribute(name=default-session-timeout, value=60) -
The change will be effective after the reloading server:
:reload
- If you are not sure what the syntax should be, you can use tab key to show what you next choose by input completion function.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.