aspose file tools*
The moose likes Servlets and the fly likes How to remove jsessionid from a URL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to remove jsessionid from a URL" Watch "How to remove jsessionid from a URL" New topic
Author

How to remove jsessionid from a URL

Hema Turupu
Greenhorn

Joined: Nov 11, 2011
Posts: 2
Hi

I have used tuckey urlrewrite for my web application which is working fine on my local system but when I upload files into the server I get a jsessionid appended to my url and it is displaying as page not found.

Once I manually remove the jsessionid from the address bar it is then displaying my webpages. This is happening only for the first time when I enter the URL in a browser. How do I remove the jsessionid that is getting appended to my url.


I have gone through links : http://stackoverflow.com/questions/5276634/remove-jsessionid-in-url-rewrite-in-spring-mvc
http://javatechworld.blogspot.com/2011/01/how-to-remove-jsessionid-from-url-java.html

But still unable to solve this problem.

Can anyone please suggest ASAP?

Regards
Hema
Miku Ranjan
Ranch Hand

Joined: Oct 11, 2011
Posts: 98
Hi,
I think that is default still if you want to replay please check with javascript on load windlow.location
Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 605

This is happening only for the first time when I enter the URL in a browser.


That's because cookies are enabled for the browsers & it (app-server, is it tomcat?) uses cookies when it is sure that cookies are enabled (it can only know cookies are enabled for certain, if it put the jsessionid in the URL for the first request). The jsessionid only goes in if you enable URLRewriting in the code (happens automatically in most frameworks)


Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to remove jsessionid from a URL