简体   繁体   English

如何删除URL(Java)中的jsessionid?

[英]how to remove jsessionid in the url (Java)?

I need help, how can I hide the jsessionid from the url? 我需要帮助,如何从URL中隐藏jsessionid? Use jboss 5.0 and web app version 2.5. 使用jboss 5.0和网络应用程序2.5版。 In the context on jboss I have 在jboss的上下文中,我有

SessionCookie secure = "true" SessionCookie secure =“ true”

httpOnly = "true" httpOnly =“ true”

Can you help me? 你能帮助我吗? " secure " and " httpOnly " must remain set to true secure ”和“ httpOnly ”必须保持为true

Exmple url : http://localhost:8080/actionMenuGeneral.do;jsessionid=EA9073194BEDF67C16BEE48600B97737 示例网址: http://localhost:8080/actionMenuGeneral.do;jsessionid=EA9073194BEDF67C16BEE48600B97737

Thank you 谢谢

Change the following in application's web.xml 在应用程序的web.xml中更改以下内容

<session-config>
    <session-timeout>60</session-timeout>
    <cookie-config>
        <http-only>true</http-only>
        <secure>true</secure>
    </cookie-config>
    <tracking-mode>COOKIE</tracking-mode>
</session-config>

More details at https://access.redhat.com/solutions/338313 有关更多详细信息, 访问https://access.redhat.com/solutions/338313

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM