• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

session management doubt

 
Raj Menon
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A request comes from the client for the first page,he enters some data in that page and submits the page,it carries him to the second page to enter some more info and after he submits this second page it carries him to the third page,in the third page we get little more info and save the data in datbase under his name.
So we've to maintain the session from the first page through to the third page.

So here we get the session in the Second page.

Now my doubt is : If we disable cookies in the browser,
In the second page form tag - action attribute- Do we need to put the third page as like below ?



In the above code Is that encodeURL necessary to maintain session for the
third page since we disable cookies ?
 
Mirko Bonasorte
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you need. Using encodeURL() your url will be appended a ';jsessionid=<your session id>'. This way, you can work with session without taking care of where your session id comes from. However, if you need to know it, you can use HttpServletRequest.isRequestedSessionIdFromCookie() method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic