• 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

sharing session objects

 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
I would like to know where it is stipuled that

In order to share the same shopping cart object between requests, the same session object that is associated with a user would be required. However, when requests are made by the same user to different web applications, the same session object cannot be retrieved using the getSession() and getSession(boolean create) methods declared by the interface javax.servlet.http.HttpServletRequest.


extracted from a mock exam.
So, the session may only be retrieved from the same web application?
I would be very grateful for any precision about this topic,
Regards,
Cyril.
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is from the J2EE spec (available on the java.sun.com site.) It states that web applications cannot share sessions. However, servlets within a web application can share a session.
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Read the Servlet 2.2 specification, page 36, section 7.3 on "Session Scope", or the Servlet 2.3 specification, page 51, section SVR7.3, or the Servlet 2.4 specification, page 56, section SVR7.3.
They all say the same thing.
Kyle
 
cyril vidal
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Kyle for this very precise answer.
Regards,
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic