tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arieh Markel <Arieh.Mar...@Central.Sun.COM>
Subject Re: R:R:Adding JAR files to tomcat server
Date Fri, 11 Feb 2000 15:38:31 GMT

> Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm
> X-No-Archive: yes
> list-help: <mailto:tomcat-dev-help@jakarta.apache.org>
> list-unsubscribe: <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> list-post: <mailto:tomcat-dev@jakarta.apache.org>
> Delivered-To: mailing list tomcat-dev@jakarta.apache.org
> From: Danno Ferrin <shemnon@earthlink.net>
> To: tomcat-dev@jakarta.apache.org
> Subject: Re: R:R:Adding JAR files to tomcat server
> 
> No, only the jars in lib are added.  the directory WEB-INF/classes is
> added as a directory.  Remember that this is on a per context basis, so
> you could do fun things like put one version of a jar in one context and
> another version (which has a bug the app depends on) another web-app. 
> Also the system classpath  and "public" classpaths are used as well.

One 'funner' thing that you could do is 'upgrade' a context.

	. remove the existing context (associated to the old directory)
	. add the context associating it with the new directory
	
(it is left as an exercise to the implementor to deal with the compatibility
issues, sharing of persistent information, etc)

Actually, this type of 'live upgrade' is something that we need to support
on the application that we have that embeds tomcat.

Arieh
> 
> The order of the search list is undefined, so it would be bad practice
> to put two jars that have a class that has the same name but different
> signatures and or implementations. Even if the classes dir is loaded
> before the lib jars is unspecified.  The magic is covered in section 10
> of the Servlet2.2 spec available at
> http://java.sun.com/products/servlet/2.2/
> 
> --Danno
> 
> Interesse Michelangelo wrote:
> > 
> > 
> > > ----------
> > > Da:   Danno Ferrin[SMTP:shemnon@earthlink.net]
> > > Risposta a:   tomcat-dev@jakarta.apache.org
> > > Inviato:      giovedì 10 febbraio 2000 17.47
> > > A:    tomcat-dev@jakarta.apache.org
> > > Oggetto:      Re: R:Adding JAR files to tomcat server
> > >
> > >
> > >
> > > > > 2) If only one web app uses it or multiple copies of the jar are
> > > > > acceptable (or you can symlink under a unix box) then put the jars
> > > under
> > > > > the WEB-INF/lib directory of the particular web app.  So for examples
> > > it
> > > > > would be <TOMCAT_HOME>/webapps/examples/WEB-INF/lib where you
would
> > > drop
> > > > > the jar.
> > > > Hmmm... really interesting to me!
> > > > Does it works with JRE 1.1.8 ? So I don' t need to declare in an
> > > explicit
> > > > way the jars for my webapp. I'll just put specific jars in the
> > > WEB-INF/lib.
> > > > Than T. will take care to look in such a dir while compiling JSP. Am I
> > > right
> > > > ?
> > >
> > > Yes, that is what the Servlet 2.2 spec requires and the test I have done
> > > shows it works.  It's not that difficult really, since Tomcat uses it's
> > > own internal classloader anyway.  Just when the context starts up it
> > > iterates through the list of files in <context>/WEB-INF/lib and adds
> > > each file to it's internal search list.  Tomcat also uses a jar url
> > > connection of it's own if the JDK connection is not there (which is
> > > really simple since java.util.zip is already in the JDK1.1).
> > >
> > Please tell me Danno, does it add <context>/WEB-INF/lib directory itself to
> > the search list, I guess ?
> > And what about the order in search list - or how could it be determined in
> > other ways ? That can be relevant when having conflicting package/class
> > paths.
> > 
> > I'm going to VISIT my dentist now, ... but I hope to read a comforting
> > answer from you (or anybody else) in a couple of hours, so to alleviate my
> > pain ;-) .... and switch my implementation that way.
> > 
> > thanks a lot,
> > 
> > > --Danno
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> > >
> > Michelangelo Interesse
> > ----------------------------
> >       Process Support Systems
> >                Netsiel S.p.A.
> >       * ++39-080-5092.220
> > ----------------------------
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

--
 Arieh Markel		                Sun Microsystems Inc.
 Network Storage                        500 Eldorado Blvd. MS UBRM11-194
 e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
 Let's go Panthers !!!!                 Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


Mime
View raw message