tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <>
Subject Re: Session Config => Tracking Mode not working
Date Tue, 18 Nov 2014 00:17:27 GMT
2014-11-18 2:49 GMT+03:00 Stephen McCants <>:
> Hello,
> I'm trying to remove the JSESSIONID from my URL the first time someone hits my Tomcat
Web App, but I've not been able to get it working for some
> reason that eludes me.  This is under Tomcat 7.0.37 and Tomcat 7.0.56.
> First thing I tried was to add session-config/tracking mode to my web.xml, resulting
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE web-app PUBLIC
>    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>    "">
> <web-app xmlns=""
>     xmlns:xsi=""
>     xsi:schemaLocation=""
>     version="3.0">

You are declaring both 2.3 DTD and 3.0 schema.
Choose one.

There exists a system property that turns on "strict servlet
compliance mode". If you use it, it enables validation of your web.xml
and will catch silly errors like this one.

>         <session-config>
>                 <tracking-mode>COOKIE</tracking-mode>
>         </session-config>

If I add the above three lines to the web.xml of examples webapp, it
works for me.

On the first visit to that example page look at "URL encoded" link at
the bottom of the page, whether it contains jsessionid in it or not.

Best regards,
Konstantin Kolinko

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message