The day yesterday i was using the application made by me in Struts. Whenevr i login , Normally it alwayz showed 32 bit session id which is being generated by the Server...
However , Today when i logged in it had shown me 64bit jsessionid. I wanted to know what exactly is this and also wanted to know that i have not used url rewriting then too how automatically does it append jsessionid to the end of URL ?
Thanks in Advance. Yogendra Joshi
Meri Zindagi Hain Tab Tak.. Jab Tak Tera Sahara.... Har Taraf Tu Hi Tu Hain SAI Tera Hi Hain Nazara.....
Cookies are not 100% reliable, though, because they can be turned off on the browser. To cover this possibility, the application server can append the session id with every link and use it to determine the session.
This is called URL Rewriting, and it's done by passing the URL to the encodeURL method on the HttpServletResponseobject. This causes the application server to append the JsessionId to the URL. If you're using Struts tags exclusively, you don't have to worry about URL rewriting because struts calls the encodeURL method for every link and action. However, if cookies are enabled on your browser, it's the cookie and not the JsessionId that's being used to attach you to a session.
So my question was why did it generate 64 chars in place of 32 chars by default which i alwayz have seen..
Waiting for your kind suggestions again.
Thanks Yogendra Joshi.
Joined: Feb 15, 2005
Since the Application Server is responsible for the generation of the JSessionId, the answer as to why it is using 64 characters lies in the documentation of whatever application server you're using. The fact that you're using Struts has nothing to do with it.