Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Sharing HttpSession across multiple web applications

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May I know how to enable multiple web applications in the same server to share the same session data?

I have webapp1 and webapp2 deployed in the same WebLogic Server (I am using WLS 8.1 sp3). When the user logon from webapp1, the session is ceated. But
when the user navigate to webapp2, another new session is created. I am using HttpSession.getSession() for both applications.

Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The HttpSession object is scoped at the application ( or servlet context level) , therefore I think there is no way to share session data betwwen 2 web application even though they are deployed in same servlet container.

Author and all-around good cowpoke
Posts: 13078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ensuring that one web application can't access data belonging to another is part of the security concious design of the API. The designers wanted a situation in which an application can be installed in any server without worrying about conflicts.

Live a little! The night is young! And we have umbrellas in our drinks! This umbrella has a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic