tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Sharing Application Code Between Contexts
Date Mon, 29 Sep 2008 11:32:03 GMT
Richard Sayre wrote:
> Is it possible to have several contexts pointing to the same code
> base?  If I am hosing an application and other clients would like to
> use it, is it possible to set them up a seprate context that points to
> one set of JSP/Java Classes?
Yes. How, depends on your Tomcat version. Look in the docs for shared
classloader.

> Are there disadvantages in doing this?
Yes. Various class-loading issues. Any changes to the common code require a
Tomcat restart. Potential incompatibility of dependencies.

Disk is cheap. Memory is cheap. A simpler solution is to provide the code
in a jar and let each web-app that wants to use it add that jar to WEB-INF lib.

Mark



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message