Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-6164

jboss-web/use-session-cookies doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Minor Minor
    • No Release
    • JBossAS-4.2.0.GA, JBossAS-4.2.1.GA, JBossAS-4.2.2.GA, JBossAS-4.2.3.GA, JBossAS-5.0.0.CR2
    • Web (Tomcat) service
    • None

      To reproduce, create a .war directory under the deploy directory and put the following jsp file:

      <%
      javax.servlet.http.Cookie[] cookies = request.getCookies();
      if (cookies != null) {
      for (int i = 0; i < cookies.length; i++) {
      if ("JSESSIONID".equals(cookies[i].getName()))

      { out.println("Session ID cookie found: " + cookies[i].getValue()); break; }

      }
      }
      %>

      And put WEB-INF/jboss-web.xml as well:

      <jboss-web>
      <use-session-cookies>false</use-session-cookies>
      </jboss-web>

      Then boot JBoss, hit the jsp file and reload. You'll see the session cookie is enabled.

      Tested with AS 5 svn rev 80575, it shows:

      2008-11-06 16:22:58,243 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/test, vfsUrl=test.war
      2008-11-06 16:22:58,244 DEBUG [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) Using session cookies default setting

      So it seems ignored.

      WEB-INF/context.xml works:

      <Context cookies="false" />

              starksm64 Scott Stark (Inactive)
              rhn-support-tkimura Takayoshi Kimura
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: