You can only disable search engines using this filter, but I would recommend using it for all answers , as this is worse than just an unfriendly search engine. It provides a session identifier that can be used for specific security exploits ( more ).
Tomcat 6 (until 6.0.30)
You can use tuckey rewrite filter .
Example configuration for a Tuckey filter:
<outbound-rule encodefirst="true"> <name>Strip URL Session ID's</name> <from>^(.*?)(?:\;jsessionid=[^\?#]*)?(\?[^#]*)?(#.*)?$</from> <to>$1$2$3</to> </outbound-rule>
Tomcat 6 (6.0.30 onwards)
You can use disableURLRewriting in the context configuration to disable this behavior.
Tomcat 7 and Tomcat 8
From Tomcat 7 onwards, you can add the following to your session configuration.
<session-config> <tracking-mode>COOKIE</tracking-mode> </session-config>
Pool Jun. 07 '09 at 20:33 2009-06-07 20:33
source share