File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes About HTTP Session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "About HTTP Session" Watch "About HTTP Session" New topic
Author

About HTTP Session

kanchi panneer
Greenhorn

Joined: Mar 23, 2005
Posts: 3
Anybody how the session id will be transfered in HTTPSession of servlet, if url rewritten and cookies are allowed?

If URL rewritten and cookies both are not allowed means, how this transfer of ID from server to client will happen?
Bhavin Sanghani
Ranch Hand

Joined: Dec 17, 2003
Posts: 67
Hi,

Another way to manage session is using hidden variable. Check servlet tutorial for that.

-bhavin
Manuel Moons
Ranch Hand

Joined: Mar 05, 2002
Posts: 229
URL rewriting should occur on the server. This means that you can not "disallow" this.

Normally the prefered way is to send the sessionid via a cookie (using the http headers). If this is not possible the server will try to maintain the sessionid via url rewriting. This means that the programmer will have to rewrite all urls that go to the client(browser) via URLEncoder.encodeURL().

It is possible to pass the session id via a hidden field.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: About HTTP Session
 
Similar Threads
Regarding cookies disabled and session info lost
url rewriting doubt
URL Re-writing, Bullet Proof Way?
Session
jsessionid