Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Management using encodeURL()

 
Dash Abhisek
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I was going through session management using encodeURL()
I have doubt regarding encodeURL
scenario:-
I have a login page where the user enters his name and password and in its action attribute I have used encodeurl() and the parameter I passed is the target servlet's name.
In the target servlet I am just dispatching the request to a jsp where I am asking the user to add some additional info about him after displaying
what he has entered in the first page.

Do I need to obtain a session(using getsession()) and use encodeurl in the servlet and pass the jsp to be hit as parameter or I have to get the id(getId())after getting the session object and write something like the undermentioned code in the servlet:-


Thanks,
Abhisek
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need not append the sessionid, encodeURL() will do it for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic