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

2002-02-01 Thread Cressatti, Dominique

I can't answer directly to your question
but here are some avenues that you might to
explore.

Here is some of the stuff I've learned so far.

You can modify the class path and append the directory
where your common classes live.

In the context section (either your apps-YourApp.xml
4 tomcat3 or server.xml 4 tomcat4)

path= only refer to the URL under which your app will
published will docbase= refer to where your app physically
lives (which I think doesn't have to be under /webapps).

And lastely may be there something that can be done in
web.xml

Dom



-Original Message-
From: Dave Ford [mailto:[EMAIL PROTECTED]]
Sent: 01 February 2002 14:15
To: [EMAIL PROTECTED]
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?

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


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




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

2002-02-01 Thread Craig R. McClanahan

On Fri, 1 Feb 2002, Dave Ford wrote:

 Date: Fri, 1 Feb 2002 06:14:38 -0800
 From: Dave Ford [EMAIL PROTECTED]
 Reply-To: Tomcat Users List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 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:   mailto:[EMAIL PROTECTED]
 For additional commands: mailto:[EMAIL PROTECTED]
 Troubles with the list: mailto:[EMAIL PROTECTED]




--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]