I run a tomcat based website which run about 10 sports leagues.  All of the 
leagues have their own war based webapp.   For the last 6 years or so I've been 
building 10 separate large war files or one for each. Each deployed webapp 
contains all the same source code copied across each.

I have been trying to think of a better way to do this. The only difference in 
each webapp is the contents of the META-INF/context.xml which contains specific 
data about what database to connect to. Everything else is the same.

I began thinking a better way to do this would be to build a new jar file and 
store it in my 

tomcat/common/lib 

directory along with all of my other shared libraries. Then my custom classes 
would only need to exist once.

Then each of my 10 WAR files would look like this:
META-INF/
META-INF/MANIFEST.MF
WEB-INF/
WEB-INF/web.xml
WEB-INF/classes/
WEB-INF/classes/log4j.properties
error/
error/notfound.html
META-INF/context.xml

As you can see, this would leave my classes directory empty since everything is 
now stored in the new jar file in my common/lib directory.
I've tried this though and it doesn't seem to work. None of the referenced 
classes in my new common/lib/ jar file are found when referenced by my web.xml 
file.

I've googled thing such as "war file without classes", etc and came up empty.

Am I going about this totally wrong?  Is it possible to have my own jar file of 
classes shared across all 10 of my webapps?


Thanks  a lot for any help.
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to