The session id is always appended to the url as path parameter at the first request even if it is disabled by web.xml <tracking-mode>

Solution Verified - Updated

Environment

  • JBoss Enterprise Application Platform (EAP) 6.0.x

Issue

  • The session id is always appended to the URLs at the first request even if it is disabled by the following <tracking-mode> setting in web.xml in EAP 6.0.
<session-config>
  <tracking-mode>COOKIE</tracking-mode>
</session-config>

Is this a bug? How do I avoid this?

Resolution

  • Upgrade to EAP 6.1.0 or later (preferably the latest) to acquire this fix.
  • Prior to EAP 6.1.0, please use the filter which is described in this article to remove the jsessionid from URLs as a workaround.
  • The attached JsessionIdRemoveFilter-EAP6.tar.gz is a sample ant project which you can build the filter by yourself.
  1. Extract the attached JsessionIdRemoveFilter-EAP6.tar.gz
  2. Edit build.properties and set jboss.home to your EAP 6 install path.
  3. Execute ant jar to build
  4. Put a generated JsessionIdRemoveFilter.jar under WEB-INF/lib of your web application

Root Cause

Components
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.