Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Java in General and the fly likes disable jsession id Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "disable jsession id " Watch "disable jsession id " New topic

disable jsession id

sanjay degala

Joined: Aug 23, 2010
Posts: 4

I have an application which is in jsp and sevlets and i deployed in tomcat. it is working fone. I am re-writing the same application using struts and hibernate. in eclipse i have used tomcat and am trying to develop the struts version. problem here is in the previous application of jsp and servlets there was never a jsessionid dispalyed in the url. but in the struts version which I am still working on is showing jsessionid in the url. can anyone tell me what's the reason for this. Is there any specific configuration or setting that is making to display jsessionid ?
Ram Narayan.M
Ranch Hand

Joined: Jul 11, 2010
Posts: 247

In general, when session is created by the container, server sends the JSESSIONID cookie to the Client... In turn, Client will send the JSESSIONID cookie in the subsequent requests with which container correctly returns the session belonging to corresponding JSESSIONID.

When Cookies are not accepted by the Client Browser, URL Re-Writing is done that is JSESSIONID is encoded in the URL itself so that it is explicit in the URL... I dont know about Struts... What is suppose is Struts use URL Rewriting technique for fetching the session corresponding to the ID...

SCJP 6 [SCJP - Old is Gold]
I agree. Here's the link:
subject: disable jsession id
It's not a secret anymore!