You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dave Ford <df...@smart-soft.com> on 2002/02/01 15:14:38 UTC

classes NOT in WEB-INF/classes or CATALINE_HOME/classes

>From my understanding of Tomcat, unjar'd classes should be placed in
WEB-INF/classes for ONE web app, and  CATALINA_HOME/classes for shared
access by ALL webapps (correct me if I'm wrong).

Here is what I would like to do: make an un-jar'd class library available to
ONE or ALL web apps. And NOT place them in pre-designated directories.
Reason: I have a development box that runs Tomcat, Orion Server and Web
Logic. It also runs non-webapps. I have a common set of classes used by all.
Don't want to maintain multiple copies of the common class library.

I understand that a webapp is supposed to be a self contained deployment
unit, but it seems that classes should, optionally, be allowed in user
defined paths. In Orion Server, this can be accomplished by adding a
classpath entry to orion-web.xml (one web app) or server.xml (all web-apps).
How can this be done in Tomcat?

Dave Ford
Smart Soft - The Developer Training Company
http://www.smart-soft.comave


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: classes NOT in WEB-INF/classes or CATALINE_HOME/classes

Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Fri, 1 Feb 2002, Dave Ford wrote:

> Date: Fri, 1 Feb 2002 06:14:38 -0800
> From: Dave Ford <df...@smart-soft.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: classes NOT in WEB-INF/classes or CATALINE_HOME/classes
>
> >From my understanding of Tomcat, unjar'd classes should be placed in
> WEB-INF/classes for ONE web app, and  CATALINA_HOME/classes for shared
> access by ALL webapps (correct me if I'm wrong).
>
> Here is what I would like to do: make an un-jar'd class library available to
> ONE or ALL web apps. And NOT place them in pre-designated directories.
> Reason: I have a development box that runs Tomcat, Orion Server and Web
> Logic. It also runs non-webapps. I have a common set of classes used by all.
> Don't want to maintain multiple copies of the common class library.
>
> I understand that a webapp is supposed to be a self contained deployment
> unit, but it seems that classes should, optionally, be allowed in user
> defined paths. In Orion Server, this can be accomplished by adding a
> classpath entry to orion-web.xml (one web app) or server.xml (all web-apps).
> How can this be done in Tomcat?
>

Two choices meet your criteria:

* Use symlinks from the predefined place for each
  server to the common spot where they are installed
  (only works on platforms supporting symlinks, obviously)

* Modify the Tomcat startup scripts to not ignore the
  CLASSPATH environment variable (requires you to take
  responsibility for resolving your own class loading
  issues).

Personally, I use a third approach:

* Set up my application deployment process to copy the required
  JAR files into each server's appropriate "lib" directory
  (or whatever) every time the app is installed.  Disk space
  is incredibly cheaper than the developer time you lose
  debugging classpath problems.


> Dave Ford
> Smart Soft - The Developer Training Company
> http://www.smart-soft.comave
>

Craig


>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>