2 Replies Latest reply on Feb 11, 2016 11:15 AM by alandent

    How to set sessionCookiePath in JBoss EAP 6

    alandent

      I am migrating a web app from tomcat to JBoss EAP 6 and have an issue setting the sessionCookiePath.

       

      In tomcat I can set the sessionCookiePath = "/" in the TOMCAT_HOME/conf/context.xml but this does not seem to exist for JBoss?

       

      I have added the session-config for servlet 3.0 as follows in web.xml:

       

      <session-config>

         <cookie-config>

         <path>/</path>

         </cookie-config>

      </session-config>


      Is there a way to do the same thing as sessionCookiePath in JBoss EAP 6?

        • 1. Re: How to set sessionCookiePath in JBoss EAP 6
          pjhavariotis

          The answer is NO. As you already indicated, EAP 6 is following the servlet 3 specification. As a result, the session configuration, including the session cookie path, exists in the application's web.xml

          • 2. Re: How to set sessionCookiePath in JBoss EAP 6
            alandent

            Thank you. So what I am seeing is that a new JSESSIONID is being created for each path rather than a single one for just the root "/". This actually happens with Tomcat too if "sessionCookiePath" is removed from the context.xml.

             

            Is this expected behavior? I was expecting to get a single JSESSIONID for the root "/" only which is what sessionCookiePath forces.