aspose file tools*
The moose likes Servlets and the fly likes Will the container take care with session tracking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Will the container take care with session tracking" Watch "Will the container take care with session tracking" New topic
Author

Will the container take care with session tracking

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hi ranchers.
As you know guys, in session tracking we may use cookies or url rewritten.
and in JSP and Servlets we can use session object to store our information.
in java web application, should we care if the client disabling cookies ( I mean, will the container
take care with this situation?)
Andres Gonzalez
Ranch Hand

Joined: Nov 27, 2001
Posts: 1561
It'll take care only if you use endodeURL of HttpServletResponse interface:
String encodeURL(String url)
String encodeRedirectURL(String url) // to be used for sendRedirect API.
Example:
response.encodeURL("/servlet/AnyServlet");
You don't have to worry whether the browser has disable cookies or not. This will save you


I'm not going to be a Rock Star. I'm going to be a LEGEND! --Freddie Mercury
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

...depending on the server.
Some application servers (eg WebSphere) require you to explicitly allow session tracking by URL rewriting in the web context settings.
 
jQuery in Action, 2nd edition
 
subject: Will the container take care with session tracking