aspose file tools*
The moose likes JSP and the fly likes Session accessing across multiple contexts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Session accessing across multiple contexts" Watch "Session accessing across multiple contexts" New topic
Author

Session accessing across multiple contexts

Naveen kn
Greenhorn

Joined: May 16, 2005
Posts: 2
Hi All
I have 2 applications running on tomcat on different contexts.
i have a link in context 'A' which calls a jsp page in context 'B'.

I am trying to access certain session variables of context 'A' in this context 'B's jsp.
It is returning null.

Can anybody explain if i can access variables like this.

Thanks
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You can not (easily anyway).
Sessions are not meant to be shared across contexts.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Naveen kn
Greenhorn

Joined: May 16, 2005
Posts: 2
Even if there is a workaround please let me know

Thanks
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
I heard some application servers provide this feature but it would be application server specific then. Nothing for sure.
 
Don't get me started about those stupid light bulbs.
 
subject: Session accessing across multiple contexts