users@glassfish.java.net

Re: configuring JSESSIONID cookie name for different web applications

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Fri, 27 Feb 2009 12:41:27 -0800

Just a quick follow up:

The Servlet EG has agreed to making the session cookie name
configurable.

The session cookie name may be configured programmatically, via the
javax.servlet.SessionCookieConfig interface, as in:

  public class SessionCookieConfigListener implements
ServletContextListener {

      public void contextInitialized(ServletContextEvent sce) {
          sce.getServletContext().getSessionCookieConfig().setName(
              "MYJSESSIONID");
      }
  }

or declaratively in web.xml, as in:

  <web-app ... version="3.0">
      <session-config>
          <cookie-config>
              <name>MYJSESSIONID</name>
          </cookie-config>
      </session-config>
  </web-app>

Support for this feature will be available in the next GlassFish v3
nightly build.

Jan

> [Message sent by forum member 'ggierer' (ggierer)]
>
> http://forums.java.net/jive/thread.jspa?messageID=332788
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net