I believe you can put it in any other directory and add that to the
CLASSPATH environment variable. From the script used to start Tomcat it
seems to use the old CLASSPATH also.

Ashish

George McKInney wrote:
> 
> -----Original Message-----
> >From: Grewal, Gary [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, May 15, 2001 9:16 AM
> >To: '[EMAIL PROTECTED]'
> >Subject: classpath
> 
> >Hi ,
> >Is it possible for a normal servlet/jsp to use java files under a
> completely
> >different directory specified under the classpath or will I have to move
> the
> >supporting java files over to the web-inf/classes directory.
> >Thanks and Regards,
> >Gary Grewal
> 
> As I understand the current situation, java code running under Tomcat 3.x
> has
> access to classes in the "standard" packages (java.io etc), any "installed
> extensions"
> (in the Java2 sense) and any .jar files in TOMCAT_HOME/lib - with ALL of
> those
> locations being searched BEFORE WEB-INF/classes, and then WEB-INF/lib.
> 
> If I'm correct, then you COULD put .jar files in TOMCAT_HOME/lib OR
> "install" them.
> 
> ... but it would (probably) be wrong! I have seen some hair-pulling messes
> when there are multiple webapps ALL putting their .jar files in
> TOMCAT_HOME/lib,
> and each webapp requires a different version of the code.
> 
> In addition, the Servlet2.3 spec seems to forbid a container's giving a
> webapp access to the container's classes (TOMCAT_HOME/lib), and Tomcat4.0
> should follow that.
> 
> So... if the classes are ones that you want EVERYONE using the jvm to use,
> install them; otherwise, keep them with their own app.
> 
> Please correct me if I have misstated the situation.
> 
> George McKinney, Developer

Reply via email to