在web.xml配置文件中设置
<session-config> <!-- Disables URL-based sessions (no more 'jsessionid' in the URL using Tomcat) --> <tracking-mode>COOKIE</tracking-mode> </session-config>