In server.xml you can specify an alternative class loader for your context webapp (see configuration reference on the tomcat docs). You will have to dig into the Tomcat code, but you may create a subclass of the default class (or use it as a template), and add some mechanisms to include extra directories at the same level as WEB-INF/lib. You could, for example, make it use a system property, or add xml properties for configuring it from server.xml

A bit advanced, and very non-standard, but it may work for your development environment :-)

Curtis Leach wrote:

I haven't tried this to see if it works, but you can always edit the
catalina.sh or setclasspath.sh files.  It's where CLASSPATH is reset during
the Tomcat startup.  (Or .bat for windows)

Curtis

-----Original Message-----
From: Anton Modaresi [mailto:[EMAIL PROTECTED]
Sent: Friday, November 07, 2003 9:31 AM
To: 'Tomcat Users List'
Subject: RE: specifying web app classpath in server xml?


My point was exactly I would rather like an extra classspath in the webapp context declaration so I could skip the work of building a jar for one project and copy it (or somehow link it) to the other project's web-inf/lib.

When I change in both projects I'd rather tell tomcat to just look a little
extra. So you say the classpath fixed? Am I the only one who want to use
tomcat in this way? how do I suggest this to developers, write to the other
mailing list?

regards, artin

-----Original Message-----
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: den 6 november 2003 15:11
To: Tomcat Users List
Subject: RE: specifying web app classpath in server xml?



Howdy,
Can you symlink your WEB-INF/lib/otherProject.jar to the other's
project's build directory?

You can't declare classpaths in server.xml.  The classpath hierarchy is
fixed.

Yoav Shapira
Millennium ChemInformatics




-----Original Message-----
From: Anton Modaresi [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 06, 2003 5:29 AM
To: [EMAIL PROTECTED]
Subject: specifying web app classpath in server xml?

Hi,
I would like to specify additional classpaths for a web app
beside the WEB-INF/lib WEB-INF/classes and common/lib directories.

My reason is I have a project using code from another project.
In a production environment you would jar the classes from the
used project and put it in the WEb-INF/lib of the other....

but in development, where both projects may be updated all the time,
I'd prefer to skip the extra overhead of either jaring all files,
or recompile the classes a second time to the WEB-INF/classes of
the taget project..

So I am wondering, is there a way, I can say in my server.xml,
hey please go and check in this additional classpath too for this
particular web app. is this possible?

(Im using tomcat 5.0.7)





This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]







--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to