permaculture playing cards*
The moose likes Servlets and the fly likes Servlets and Session-ID ( no cookie ... ) 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 "Servlets and Session-ID ( no cookie ... )" Watch "Servlets and Session-ID ( no cookie ... )" New topic
Author

Servlets and Session-ID ( no cookie ... )

ing erl
Greenhorn

Joined: Jan 27, 2006
Posts: 15
Hello,

Trying some examples here in 'head first servlets & jsp'.
using JEE 1.5,EL and JSTL.
I am using a form that is doPost.

Wanting to turn off the cookies and do everything myself with
the sessionid - seems difficult to me.
Trying to follow the MVC schema that my Servlet is my controller,
and that is where I should be handling my sessionid.

Using the 'HttpSession session = request.getSession(true);'
in my Servlet, reading on URL rewriting but not quite getting that.
Seems that the cookies are the default, because I get the values
that I except using cookies ...

using the following:
if ( session.isNew() ) { // Session created for the first time ...
} else {
}

then doing the 'String jSessionId= session.getId();'
should I do some rewriting here? using the response and
do some rewriting and then using the dispatcher ?



the encodeUrl is deprecated ...
I am not sure how to resend the ID to the client everytime,
seen that ofcourse on some sites and I can se that on some sites:
';jsessionid=FBD552505F99A7323F4C0E030AC3C284.node1'

is there a good example somewhere ?

regards, i
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlets and Session-ID ( no cookie ... )
 
Similar Threads
URL rewriting is not working
Session management ambiguity
question regarding maintaining session
How to find that Cookies are supported by the browser or not
Head First Problem