Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt regarding response.encodeURL and JSessionid

 
kesava chaitanya
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

imy doubt regarding response.encodeURL

i know this method is used when u disable cookies in the browser

jsessionid will append in the URL

<a href="<%=response.encodeURL(ex.jsp)%>"?name='+name>

my doubt is how jsessionid will append to the URL when i use encodeURL method;

should i create sessionid using session.getId();

should i applend this sessionid to the URL;

how this Jsessionid will work in ex.jsp when i use request.getParameter("name");


what is the use of jsessionid here explain me clearly
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AFAIK, The jsessionid values you see in the query strings are a mechanism internal to the application server, used by it to identify a user's session if the cookies are disabled on the browser.

You shouldnt need to do any explicit processing with it, just let the container handle it. All that you have to do is use the encodeRedirectURL method of the response whenever you write a URL string using Java code, so that the container can do the necessary work.

HTH.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic