You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ju Yan Jery Qin <jq...@ptc.com> on 2001/08/22 04:32:19 UTC

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

Re: 答复: How do I make Tomcat include needed jars for my servlet?

Posted by Dmitri Colebatch <di...@bigpond.net.au>.
Hi,

I'm not sure how wars respond to this, perhaps you could put an empty jar
in lib/ to do it... but what about having a classpath attribute in the
manifest file?  pointing to the other jars you need.?

hth
dim

On Wed, 22 Aug 2001, Ju Yan Jery Qin wrote:

> Hi dwh
> 	I use 3.2.2.  I know your mean. But what I want to do is to define application specific CLASSPATH. Sorry for confusion in my question. Thanks!
> 
> 
> -----ԭʼ�ʼ�-----
> ������: Denis Haskin [mailto:Denis@HaskinFerguson.net]
> ����ʱ��: 2001��8��22�� 10:52
> �ռ���: tomcat-user@jakarta.apache.org
> ����: jqin@ptc.com
> ����: Re: How do I make Tomcat include needed jars for my servlet?
> 
> 
> For Tomcat 3.2.x, just modify your tomcat.bat file to set up the
> classpath as you need it. I assume something similar can be done for TC4.
> 
> dwh
> 
> Ju Yan Jery Qin wrote:
> 
> >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.
> >
> 
> 
> 


答复: How do I make Tomcat include needed jars for my servlet?

Posted by Ju Yan Jery Qin <jq...@ptc.com>.
Hi dwh
	I use 3.2.2.  I know your mean. But what I want to do is to define application specific CLASSPATH. Sorry for confusion in my question. Thanks!


-----原始邮件-----
发件人: Denis Haskin [mailto:Denis@HaskinFerguson.net]
发送时间: 2001年8月22日 10:52
收件人: tomcat-user@jakarta.apache.org
抄送: jqin@ptc.com
主题: Re: How do I make Tomcat include needed jars for my servlet?


For Tomcat 3.2.x, just modify your tomcat.bat file to set up the
classpath as you need it. I assume something similar can be done for TC4.

dwh

Ju Yan Jery Qin wrote:

>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.
>



Re: How do I make Tomcat include needed jars for my servlet?

Posted by Denis Haskin <De...@HaskinFerguson.net>.
For Tomcat 3.2.x, just modify your tomcat.bat file to set up the
classpath as you need it. I assume something similar can be done for TC4.

dwh

Ju Yan Jery Qin wrote:

>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.
>