IntelliJ Java IDE
The moose likes Tomcat and the fly likes Can two tomcat contexts point to one docBase? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "Can two tomcat contexts point to one docBase?" Watch "Can two tomcat contexts point to one docBase?" New topic
Author

Can two tomcat contexts point to one docBase?

Christopher Zinn
Greenhorn

Joined: Nov 03, 2003
Posts: 13
I have a web application that runs on Tomcat 4.1.29/Oracle 9i. I have 40
instances of this application running. Each instance connects to a different database and has its own security realm, so I have a context.xml and an unpacked directory for each instance. A client can get to their instance by navigating to http://server/instance.
To make things more managable, I changed the installation to have 40 context.xmls pointing to just one unpacked directory (In each context.xml, I set the docBase attribute to the same directory). When we release a new version (which we do about once a week); instead of precompiling the JSPs in the application 40 times, it just precompiles once. (The application has about 250 JSPs).
This seems to work great, but I don't know how "safe" this is.
Does this configuration confuse the Jasper Page Compiler at all?
Does this confuse the Class Loaders?
Will this cause any unforeseen problems?
Thanks for any insite,
- Chris
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You'll get a better response in the Tomcat forum. I'll move it there for you.
Dave.


[ JavaRanch FAQ ][ Book Promotions ][ DbTamer ][ BumperStickers ][ JavaRanch Badges ]
 
 
subject: Can two tomcat contexts point to one docBase?
 
Threads others viewed
Accessing a context.xml from a virtualhost
About server.xml in Tomcat
Problem Undeploying webapps
Why is it deploying in two contexts? I'm stumped
question about Eclipse and running on Tomcat
IntelliJ Java IDE