My setup is as follows:

d:\development\projectX\src - contains all source code
d:\development\projectX\WEB-INF\classes - compiled classes get here (use
javac -d ...)

server.xml has this entry:

     <Context path="/foo"
                      docBase="d:\development\projectX"
                      debug="0"
                      reloadable="true" >
      </Context>

Any time there's a change TC should detect it and reload your webapp,
subject to TC limitations on classes/servlet reloading ...

In other words, don't use jars if your classes are changing frequently,
use ...\WEB-INF\classes as a target for your compilation.
If you really like jar files then some IDE's like JBuilder allow you to
set a jar file which will be updated as needed whenever you build
your projects.

CLASSPATH usually means system classpath, and "webapp CLASSPATH"
is ...\WEB-INF\classes;...\WEB-INF\lib\*.jar, afaik there's no way to change
it.

--V.

----- Original Message -----
From: "Ju Yan Jery Qin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 6:33 PM
Subject: How do I make Tomcat include needed jars for my servlet?


> Hi all,
> I have read this topics but it still can not resolve my problem.  Your
suggestion is to copy application related jar files into
%YourWebAppPath%/WEB-INFO/lib dirctory. But my application is under
development, so whenever I regenerated jar files for  my web app, I have to
copy them to that directory again. If under UNIX, you can use symbolic
links, but I use Windows 2000 as my server.  So my question is: is there any
way to define CLASSPATH variable for my web application independently so
that I don't need to copy them again and again.
> In fact, in my case, I have two web application which are derived from the
same base but should be installed independently. So these two web
application have many classes with the same package and name. And these
classes spreaded in two directory d:\vendor\webapp1 and d:\vendor\webapp2
but not in jar file. So I really need a way to define CLASSPATH in
application level instead of copy tons of variable classes into
d:\vendor\webapp1\WEB-INFO\classes and d:\vendor\webapp2\WEB-INFO\classes
again and again.
>
> Any clue is appreciated!
>
> Best Regards!
>
> Jerry Chin

Reply via email to