Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why jsessionid is appended to each url?

I am deploying an app using the Spring framework on the Apache Tomcat. When running the application from Tomcat directly, there's no jsessionid appended to any URL at all, but after mapping the application to the domain, and trying to run it, I got a jsessionid appended to each URL in the application. I tried the Spring security attribute disable-url-rewriting but it doesn't work; it removes the jsessionid from the URL but the application doesn't work any more and the user cannot login.

So I guess it's another problem. Any ideas why this happens or how to solve it?

like image 619
sword101 Avatar asked May 08 '10 17:05

sword101


People also ask

Why Jsessionid is created?

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.

Where is Jsessionid stored?

By default, Oracle Forms requests a JSESSIONID be generated and maintained in the URL of each exchange between the client and server. The JSESSIONID is generated by the WebLogic Server (WLS) managed server hosting the Forms Servlet. WLS adds the JSESSIONID to the URL using a method called URL Rewriting.

What information does Jsessionid contain?

Each authenticated user has an HttpSession, so each jsessionid locates the authenticated user information. Note, however, that the jsessionid contains no sensitive information itself, it's just a randomly-generated lookup key, and that key can, and will change value without notice.

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

Fixed in Spring Security 3 https://jira.springsource.org/browse/SEC-1052

like image 134
jpse Avatar answered Nov 18 '22 05:11

jpse