You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Albert Yip <al...@spike.com.au> on 2001/08/21 12:04:14 UTC

classpath questions

Hi all,

I am wondering if someone can instruct me or point me in the direction on
how to make apps I create in the same tomcat to start with different
classpaths and libraries? Currently I add the jar file into the global
classpath but when I have more than one apps on tomcat, I run into trouble.
Tomcat is not able to call the servlets intended. For example, if I have 2
apps, App A with servlet a and App B with servlet b. When i use a browser
and call App A with servlet b, say http://127.0.0.1/appA/servlet/b,  it will
still work. How to avoid this?

Thanks,
Albert



<FONT SIZE=1 FACE="ARIAL" > 
<p>_____________________________________________________________________________

This e-mail (and any attachment) is intended only for the addressee and
may contain confidential information.  If you are not the intended recipient
you must not use, copy, print or distribute this e-mail. If you receive this
e-mail in error, please contact the sender and destroy the original.</p>
<p>This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
_____________________________________________________________________________</p>
</FONT>

Re: classpath questions

Posted by Nitin Goyal <ni...@webrizon.com>.
Hi,

I think you dont need to add the application jar file to the global classpath.
Whenever you create a new conext/application with a jar file, all the classes
within this jar are automatically loaded by tomcat if required.

So in your case, if you want to avoid the App A from calling servlet b, just
remove the AppA.jar and AppB.jar from the global classpath.  Now App A will only
be able to call servlet a (and all others within AppA.jar) and NOT servlet b.
Similaryly App B will be able to call only servlet b and NOT servlet a.

Regards
Nitin Goyal
Webrizon eSolutions Pvt. Ltd.,
B-31, Sector 5, Noida-201301 (UP) INDIA
Tel (O) : 91.118.4421319, 4421320. Cell : 91.9810353030
nitin.goyal@webrizon.com

There is no failure except in no longer trying.


----- Original Message -----
From: "Albert Yip" <al...@spike.com.au>
To: <to...@jakarta.apache.org>
Sent: Tuesday, August 21, 2001 3:34 PM
Subject: classpath questions


Hi all,

I am wondering if someone can instruct me or point me in the direction on
how to make apps I create in the same tomcat to start with different
classpaths and libraries? Currently I add the jar file into the global
classpath but when I have more than one apps on tomcat, I run into trouble.
Tomcat is not able to call the servlets intended. For example, if I have 2
apps, App A with servlet a and App B with servlet b. When i use a browser
and call App A with servlet b, say http://127.0.0.1/appA/servlet/b,  it will
still work. How to avoid this?

Thanks,
Albert



<FONT SIZE=1 FACE="ARIAL" >
<p>_____________________________________________________________________________

This e-mail (and any attachment) is intended only for the addressee and
may contain confidential information.  If you are not the intended recipient
you must not use, copy, print or distribute this e-mail. If you receive this
e-mail in error, please contact the sender and destroy the original.</p>
<p>This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
_____________________________________________________________________________</p
>
</FONT>