jsessionID gets appended to the url when running GAE devserver

后端 未结 1 1583
被撕碎了的回忆
被撕碎了的回忆 2021-01-12 05:28

For some reason string like: ;jsessionid=SESSION_HERE gets added to urls when I visit my app deployed to GAE devserver.

This messes things up since for

相关标签:
1条回答
  • 2021-01-12 05:45

    Add:

    <context-param>
        <param-name>org.mortbay.jetty.servlet.SessionURL</param-name>
        <param-value>none</param-value>
    </context-param>
    

    ... to your web.xml. Read more on this in jetty session documentation.

    Note: GAE is running on Jetty 6.1. In anyone experiences the same problem with a newer Jetty version, the configuration parameter is named differently, see Jetty 9 session management:

    • org.eclipse.jetty.servlet.SessionIdPathParameterName

    • jsessionid

    • Session URL parameter name. Defaults to jsessionid, but can be set for a particular webapp with this context param. Set to "none" to disable URL rewriting.

    0 讨论(0)
提交回复
热议问题