In Jetty 7.3.0, I do this by: a) Deploying using a context xml file (in the jetty/contexts directory) b) Supplying an overrideDescriptor c) In the override descriptor, specifying: <context-param> <param-name>org.eclipse.jetty.servlet.SessionCookie</param-name> <param-value>XSESSIONID</param-value> </context-param>
Sample context file: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> <Configure class="org.eclipse.jetty.webapp.WebAppContext"> <Set name="contextPath">/foo</Set> <Set name="war"><SystemProperty name="jetty.home" default="."/>/wars/foo.war</Set> <Set name="overrideDescriptor"><SystemProperty name="jetty.home" default="."/>/contexts/override/foo_web.xml</Set> <!-- DON'T KNOW IF THE BELOW SETTINGS ARE RELEVANT TO OVERRIDING THE SESSION COOKIE --> <Set name="extractWAR">false</Set> <Set name="copyWebDir">false</Set> <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set> <Set name="sessionHandler"> <New class="org.eclipse.jetty.server.session.SessionHandler"> <Arg> <New class="org.eclipse.jetty.server.session.HashSessionManager"> </New> </Arg> </New> </Set> <Get name="sessionHandler"> <Get name="sessionManager"> <Set name="idManager"> <New class="org.eclipse.jetty.server.session.HashSessionIdManager"> <Set name="workerName"><SystemProperty name="jetty.port" default="8080"/></Set> </New> </Set> </Get> </Get> </Configure> Sample Override XML: <?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <context-param> <param-name>org.eclipse.jetty.servlet.SessionPath</param-name> <param-value>/foo</param-value> </context-param> <context-param> <param-name>org.eclipse.jetty.servlet.SessionCookie</param-name> <param-value>XSESSIONID</param-value> </context-param> <context-param> <param-name>org.eclipse.jetty.servlet.SessionDomain</param-name> <param-value>.foo.com</param-value> </context-param> </web-app> On May 16, 2014, at 6:13 AM, Tom Götz <t...@decoded.de> wrote: > Hi, > > might be slightly offtopic, but: does someone know how to change to name of > the session cookie from „JSESSIONID“ to something else (in Tomcat 7.0.42 and > Jetty 6.1.26)?. Background: we have a Wicket app that runs inside an iFrame > of another Wicket app, so we have two cookies named „JESSESIONID“ … > > Cheers, > -Tom > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org >