jQuery in Action, 3rd edition
The moose likes JSP and the fly likes doubt regarding response.encodeURL and JSessionid Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "doubt regarding response.encodeURL and JSessionid" Watch "doubt regarding response.encodeURL and JSessionid" New topic

doubt regarding response.encodeURL and JSessionid

kesava chaitanya
Ranch Hand

Joined: Aug 15, 2001
Posts: 140

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

Joined: Feb 02, 2002
Posts: 1211

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.

I agree. Here's the link: http://aspose.com/file-tools
subject: doubt regarding response.encodeURL and JSessionid
It's not a secret anymore!