You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Kresimir (Binsco)" <kr...@binsco.com> on 2001/04/17 18:37:31 UTC

question about CLASSPATH

When setting up different applications in server.xml for an instance of tomcat,
is there a way to setup different CLASSPATH for each application?
Is there are way to setup CLASSPATH to be "application" specific.
For example, if I have two different applications

.../jakarta-tomcat/webapps/prod... and
.../jakarta-tomcat/webapps/test... 

Can I have tomcat use different CLASSPATH for each.
For example, if beyond these directories I have a packages:
.../jakarta-tomcat/webapps/prod/WEB-INF/classes/package
.../jakarta-tomcat/webapps/test/WEB-INF/classes/package

and my classes in package are the same, just different versions (like test and prod instances)
how can I make tomcat to use classes from /prod/...package
when I use URL:
http://something/prod/jsp1.jsp - use classes from prod/.../package and
http://something/test/jsp1.jsp - use classes from test/...package

Assuming that in my classes (all of them) I use the same import,
import package.*

Please help...
Thanks.


Re: question about CLASSPATH

Posted by Sam Newman <sa...@stamplets.com>.
Tomcats special classloader should only access classes for each webapp under your webapp directory. You don't have to worry about classes in webapps/bob/WEB-INF/classes picking up webapps/fred/WEB-INF/classes for example.

sam
  ----- Original Message ----- 
  From: Kresimir (Binsco) 
  To: tomcat-user@jakarta.apache.org 
  Sent: Tuesday, April 17, 2001 5:37 PM
  Subject: question about CLASSPATH


  When setting up different applications in server.xml for an instance of tomcat,
  is there a way to setup different CLASSPATH for each application?
  Is there are way to setup CLASSPATH to be "application" specific.
  For example, if I have two different applications

  .../jakarta-tomcat/webapps/prod... and
  .../jakarta-tomcat/webapps/test... 

  Can I have tomcat use different CLASSPATH for each.
  For example, if beyond these directories I have a packages:
  .../jakarta-tomcat/webapps/prod/WEB-INF/classes/package
  .../jakarta-tomcat/webapps/test/WEB-INF/classes/package

  and my classes in package are the same, just different versions (like test and prod instances)
  how can I make tomcat to use classes from /prod/...package
  when I use URL:
  http://something/prod/jsp1.jsp - use classes from prod/.../package and
  http://something/test/jsp1.jsp - use classes from test/...package

  Assuming that in my classes (all of them) I use the same import,
  import package.*

  Please help...
  Thanks.