wood burning stoves 2.0*
The moose likes Tomcat and the fly likes How to make a context child of an existing context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to make a context child of an existing context" Watch "How to make a context child of an existing context" New topic
Author

How to make a context child of an existing context

Sivaraman Lakshmanan
Ranch Hand

Joined: Aug 02, 2003
Posts: 231
Hi,
I have 2 context in Tomcat say Context A and Context B. I want some session variable of A to be accessed by B. So I thought of making the context B as a child for Context A. Can some one help me how to achieve this.
Any help on this will be very much appreciated.

Regards,
Sivaraman.L
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

There is no provision in the spec or in Tomcat for nesting contexts.
If the two need to interact that closely, then they should be one context.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Sivaraman Lakshmanan
Ranch Hand

Joined: Aug 02, 2003
Posts: 231
Hi,
Thanks for your reply. But is there any way to share information between context in tomcat 4.1.

Regards,
Sivaraman.L
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

From:
http://wiki.apache.org/jakarta-tomcat/HowTo



Obviously, this doens't make for an easy distribution of your app.

If they need to share session information, why did you make them two seperate contexts?
[ July 22, 2005: Message edited by: Ben Souther ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to make a context child of an existing context