File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Session without Cookie Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session without Cookie" Watch "Session without Cookie" New topic

Session without Cookie

Mathias Andrae

Joined: Feb 04, 2002
Posts: 23
Can anybody give me some sourcecode for a servlet which handles sessions with URL-rewriting and EXPLICITELY WITHOUT cookies.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Check out chapter 9 of Marty Halls Core Servlets & JSP book at
Remember that if cookies are not disabled the servlet will use cookies for session tracking. It switches to URL-rewriting (if you coded for it), only if cokies are disabled.

So much trouble in the world -- Bob Marley
Mathias Andrae

Joined: Feb 04, 2002
Posts: 23
Thanks for your fast answer.
But I have to request again.
Is there really no way to prevent cookies while coding the servlet???
I agree. Here's the link:
subject: Session without Cookie
It's not a secret anymore!