tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kitching Simon <Simon.Kitch...@orange.ch>
Subject RE: adding jar to context's classpath (but not to ALL contexts... )
Date Mon, 02 Oct 2000 19:24:02 GMT

Hi,

If you're on unix, then you should be able to 
create a link to the jar files from the 
WEB-INF/lib directory of each webapp 
that needs the jar files.

However, I suggest you reconsider your dislike 
of having multiple copies of the jar files. Each 
webapp really should be independent, so it can
be deployed as a unit. Having all required 
libraries for a webapp inside the webapp itself 
is the best way of achieving this. If you have libraries
outside the webapp, then deploying it to your 
production system will be a pain. I can't imagine 
having so many webapps on a single machine
(or such large jar files) that the diskspace becomes 
an issue. Yes, I guess there is the problem of having 
to update multiple webapps if you want to update
the jar file, but then again you are just as likely to 
want some webapps to remain with old & reliable 
libraries rather than be forced to update because 
they happen to share a library with a webapp that 
needs an updated version. 

Just my two cents...

Cheers,

Simon

> -----Original Message-----
> From:	Woods, Jason [SMTP:jason.woods@vignette.com]
> Sent:	Monday, October 02, 2000 8:44 PM
> To:	'Josh Knowles'; 'tomcat-user@jakarta.apache.org'
> Subject:	RE: adding jar to context's classpath (but not to ALL
> contexts... )
> 
> 
> Actually, I forgot to mention I didn't want to put the jar file into the
> WEB-INF/lib directory.
> There are various reasons I don't want to do this, and one of them is that
> the jar file may be used by multiple contexts (but not all contexts) - so
> I
> don't want multiple copies of the jar file floating around everywhere.
> 
> - Jason
> 
> 
> -----Original Message-----
> From: Josh Knowles [mailto:josh.knowles@worldwidepackets.com]
> Sent: Monday, October 02, 2000 1:30 PM
> To: 'tomcat-user@jakarta.apache.org'; 'jason.woods@vignette.com'
> Subject: RE: adding jar to context's classpath (but not to ALL
> contexts... )
> 
> 
> I am not sure if this answers your question but you can put jar files
> inside
> of the WEB-INF/lib directory for each context and they will show up in the
> classpath.
> 
> hope this helps,
> 
> Josh Knowles
> 
> -----Original Message-----
> From: Woods, Jason [mailto:jason.woods@vignette.com]
> Sent: Monday, October 02, 2000 11:05 AM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: adding jar to context's classpath (but not to ALL contexts...)
> 
> 
> 
> 
> Is there a way in Tomcat to add a jar file to a context's classpath
> (available to all servlets/etc. within that context) on a per-context
> basis
> (as opposed to editing the tomcat.properties file and adding a
> wrapper.classpath prop - which makes it available to all contexts)?
> 
> This seems like a pretty simple thing to do which other servlet containers
> allow you to do - but I can't find any place to do it based on info in the
> server.dtd or web.dtd.
> 
> Interested in answers for both 3.1 & 3.2.
> 
> 
> Thanks,
> 
> - Jason

Mime
View raw message