This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes working of encodeURL() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "working of encodeURL()" Watch "working of encodeURL()" New topic

working of encodeURL()

Monalisa Das

Joined: May 05, 2013
Posts: 11
when does response.encodeURL() works i.e when it will append jsessionid at the end of url and when it will simply return the url
shiva pandey

Joined: Jan 24, 2011
Posts: 10
At the first request from client ,container starts new session and sends the response with both a 'set cookie' header for the session id and the session id appended to the urls(if response.encodeURL() is being used).
Now suppose next request comes from this client, it will have the session id appended to the request url ,but if client accepts cookies, the request will also have a session id cookie.when container knows that client accept cookies,it ignores the response.encodeURL() calls and sends a cookie in response.
I agree. Here's the link:
subject: working of encodeURL()
Similar Threads
mapping a servlet to multiple urls.
play videos using jsp problem?
Requested Dispatcher
redirect from index.jsp to login.jsp
ejb-ref doubt......