从网址中删除jsessionid [英] Remove jsessionid from URL

查看:637
本文介绍了从网址中删除jsessionid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究具有以下技术的项目:

I'm working on a project with the following technologies:

  • 春天
  • ShiroFilter
  • PrettyFaces
  • Tomcat服务器

当我将其部署在tomcat服务器上时,我在URL的末尾添加了"JSESSIONID 456jghd787aa".

While I'm deploying it on tomcat server, I'm getting a "JSESSIONID 456jghd787aa" added at the end of the URL.

我正在尝试解决此问题,但我无法做到这一点.

I was trying to resolve this but I'm not able to do that.

推荐答案

对于tomcat 7,请将其添加到web.xml

For tomcat 7 add this to web.xml

<session-config>
  <!-- Disables URL-based sessions (no more 'jsessionid' in the URL using Tomcat) -->
  <tracking-mode>COOKIE</tracking-mode>
</session-config>

这篇关于从网址中删除jsessionid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆