如何防止在URL中显示JSESSIONID [英] How to prevent the JSESSIONID showing in the URL

查看:1217
本文介绍了如何防止在URL中显示JSESSIONID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Google Datastore在servlet中创建了一个登录页面,它工作正常。但有时它会在URL中显示JSESSIONID。



如何防止JSESSIONID通过URL发送?
为什么它通过URL而不是请求消息?

解决方案

您是否使用响应.encodeURL()?如果是这样,请尝试删除它或禁用URL重写并检查URL。



另见:


  • disableURLRewriting





其他信息:<-doc / config / context.htmlrel =nofollow noreferrer> Apache Tomcat配置参考



response.encodeURL(URL)添加; jsessionid = xxxx ... 到URL。要禁用这个(=URL重写),

Tomcat 7.0或更高版本:

 <会话配置> 
< tracking-mode> COOKIE< / tracking-mode>
< / session-config>

Tomcat 6.0:

 < Context disableURLRewriting =true... 


I have created an login page in servlet using Google Datastore, it is working fine. but sometimes its showing the JSESSIONID in the URL.

How can I prevent the JSESSIONID sending through the URL? why its passing through the URL instead of request message?

解决方案

Are you using response.encodeURL()? If so, try to remove it or disable "URL Rewriting" and check the URL.

See also:

  • disableURLRewriting

Apache Tomcat Configuration Reference

Additional information:

response.encodeURL(URL) adds ;jsessionid=xxxx... to URL. To disable this(="URL Rewriting"),

Tomcat 7.0 or later:

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

Tomcat 6.0:

<Context disableURLRewriting="true" ...

这篇关于如何防止在URL中显示JSESSIONID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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