Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

remove jsessionid in url

I am facing a problem in jsf web application deployed in jetty web-server. When access application in browser, jsessionID is appended in the url. I want to remove it from there. Thanks in advance.

like image 676
NAC Avatar asked Oct 19 '11 10:10

NAC


People also ask

Why does URL show Jsessionid?

This isn't a bug, it's by design. When a new session is created, the server isn't sure if the client supports cookies or not, and so it generates a cookie as well as the jsessionid on the URL.

Where is Jsessionid stored?

To Start off the JSESSIONID is stored in a cookie. If cookies are turned off, you have to get into url rewritting to store the jsessionid in the url.

Is Jsessionid a cookie?

JSESSIONID is a cookie generated by Servlet containers and used for session management in J2EE web applications for HTTP protocol. If a Web server is using a cookie for session management, it creates and sends JSESSIONID cookie to the client and then the client sends it back to the server in subsequent HTTP requests.

Is Jsessionid and session ID same?

The JSESSIONID is generated from the servlet-container like jetty or tomcat or the builtin if you run a grails app standalone. The session-id is generated from the used http-server like apache, etc.


1 Answers

Set the org.mortbay.jetty.servlet.SessionURL parameter to none in either the application web.xml or the context configuration.

See the Jetty jsessionId documentation.

like image 58
McDowell Avatar answered Sep 22 '22 18:09

McDowell