aspose file tools*
The moose likes Servlets and the fly likes Sharing HttpSession across multiple web applications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Sharing HttpSession across multiple web applications" Watch "Sharing HttpSession across multiple web applications" New topic
Author

Sharing HttpSession across multiple web applications

Alamak Puchong
Greenhorn

Joined: Jul 02, 2005
Posts: 1
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.

Thanks,
Alamak
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi,

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.

Thanks


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
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.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sharing HttpSession across multiple web applications