How to disable http session creation in specific JSP
Environment
- JBoss Enterprise Application Platform (EAP)
- 4.x
- 5.x
- 6.x
- 7.x
- 8.x
- JBoss Enterprise Web Server (EWS)
- Tomcat 5.5
- Tomcat 6.0
- Tomcat 7.0
Issue
- Request to a JSP seem to automatically create a session. How can I disable http session creation in a specific JSP?
Resolution
-
You can disable http session creation in JSP by setting the "
session" attribute tofalseinpagedirective:<%@ page session="false" %>
SBR
Category
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.