• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HttpSession API for Session Management

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
We are using HttpSession API for session management. (i.e) request.getSession( ) etc., etc.,
Now, the question is
1. How is the session managed? Is it through the cookies?
2. In WebSphere under Services->Session Manager Service we have the options of choosing Cookies or URL-rewriting for session Management. Say, If I choose both, then if the client disables the cookies in the browser will it still work?
Please clarify these queries ASAP.
Thanks & Regards,
Nijeesh.
 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Cookies or URL-rewriting for session Management
is transparent to developer and user in J2EE.
If browser is disable cookie,then URL-rewriting
will be used,but one time only one is be used,not
both.
Any wrong with my opinion?
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Session management will still work if the client refuses cookies.. but only if you make sure all of your URLS (in both JSP and servlets) are run through the encodeURL() method of the HttpServletResponse object.

From the API:

For robust session tracking, all URLs emitted by a servlet should be run through this method.
Otherwise, URL rewriting cannot be used with browsers which do not support cookies.

 
reply
    Bookmark Topic Watch Topic
  • New Topic