You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by gf...@ooglee.com on 2000/03/30 22:33:35 UTC

Re: Automagic loading of WEB-INF/lib???

Hi,

I would like to reopen this thread. I'm seeing the original behavior in 
3.1Beta: jarred servlets and classes in WEB-INF/lib are not getting loaded. Is 
it still expected that they should be?

-- Fred Ellis

 Danno Ferrin wrote : 
> It's been patched, RC2 should have the fix, or thr head of the CVS.
> 
> --Danno
> 
> ----- Original Message -----
> From: "Fergus Gallagher" <Fe...@OrbisUK.com>
> To: <ge...@jakarta.apache.org>
> Sent: Tuesday, January 18, 2000 5:01 AM
> Subject: Re: Automagic loading of WEB-INF/lib???
> 
> 
> > Hi,
> >
> >
> > I couldn't get that to work - I think a / is missing
> > (basepath+"/"+libpath+"/"+jarfile), similarly in line a bit above
> >
> >             File f =  new File(basepath + "/" +libpath + "/");
> >
> > I actually tried this in 3.1 RC1 - ServletClassLoaderImpl - but relevant
> 
> code look identical.
> >
> > Sorry I'm not fully diff-aware!
> >
> > Fergus
> >
> > Lars Hofhansl wrote:
> > >
> > > Hi,
> > >
> > > the stock tomcat 3.0 contains a bug that'll prevent jar files
> > > in the WEB-INF/lib directory from being searche for classes.
> > >
> > > I'm astonished that nobody else went into this problem so far.
> > >
> > > Anyway, here's a tiny patch to fix that:
> > >
> > > ---------------------- snip --------------------------
> > > diff -u -r
> > > jakarta-tomcat/src/share/org/apache/tomcat/core/ServletClassLoader.ja
> > > va
> > >
> jakarta-tomcat.new/src/share/org/apache/tomcat/core/ServletClassLoader.java
> 
> > ---
> > > jakarta-tomcat/src/share/org/apache/tomcat/core/ServletClassLoader.java
> 
> > Wed Dec 15 17:49:52 1999
> > > +++
> > >
> jakarta-tomcat.new/src/share/org/apache/tomcat/core/ServletClassLoader.java
> 
> > Sun Jan 16 17:45:04 2000
> > > @@ -127,7 +127,7 @@
> > >                  try {
> > >                      String jarfile = (String) jars.elementAt(i);
> > >                      URL jarURL = new URL(protocol,hostname,port,
> > > -                                         basepath + jarfile);
> > > +                                         basepath +
> > > libpath+"/"+jarfile);
> > >                      addURL(jarURL);
> > >                  }catch(MalformedURLException mue) {
> > >                  }
> > > ----------------------- snip --------------------------
> > >
> > > 'hope that helps,
> > >
> > >         Lars
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: general-help@jakarta.apache.org
> >
> > --
> > Fergus Gallagher          Tel: +44 (20) 89 87 07 17
> > Orbis                     Fax: +44 (20) 87 42 26 49
> > The Swan Centre           email: Fergus.Gallagher@orbisuk.com
> > Fishers Lane              Web: http://www.orbisuk.com
> > London W4 1RX / UK
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: general-help@jakarta.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org
> 
> 

Re: Automagic loading of WEB-INF/lib???

Posted by Fergus Gallagher <Fe...@OrbisUK.com>.
I'm using the 3.1 beta and jar auto-loading works (with JDK1.2 / Solaris at 
least)

Fergus

At 15:33 30/03/00 -0500, you wrote:
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: 7bit
>AttachmentType: Text
>
>Hi,
>
>I would like to reopen this thread. I'm seeing the original behavior in
>3.1Beta: jarred servlets and classes in WEB-INF/lib are not getting 
>loaded. Is
>it still expected that they should be?
>
>-- Fred Ellis
>
>  Danno Ferrin wrote :
> > It's been patched, RC2 should have the fix, or thr head of the CVS.
> >
> > --Danno
> >
> > ----- Original Message -----
> > From: "Fergus Gallagher" <Fe...@OrbisUK.com>
> > To: <ge...@jakarta.apache.org>
> > Sent: Tuesday, January 18, 2000 5:01 AM
> > Subject: Re: Automagic loading of WEB-INF/lib???
> >
> >
> > > Hi,
> > >
> > >
> > > I couldn't get that to work - I think a / is missing
> > > (basepath+"/"+libpath+"/"+jarfile), similarly in line a bit above
> > >
> > >             File f =  new File(basepath + "/" +libpath + "/");
> > >
> > > I actually tried this in 3.1 RC1 - ServletClassLoaderImpl - but relevant
> >
> > code look identical.
> > >
> > > Sorry I'm not fully diff-aware!
> > >
> > > Fergus
> > >
> > > Lars Hofhansl wrote:
> > > >
> > > > Hi,
> > > >
> > > > the stock tomcat 3.0 contains a bug that'll prevent jar files
> > > > in the WEB-INF/lib directory from being searche for classes.
> > > >
> > > > I'm astonished that nobody else went into this problem so far.
> > > >
> > > > Anyway, here's a tiny patch to fix that:
> > > >
> > > > ---------------------- snip --------------------------
> > > > diff -u -r
> > > > jakarta-tomcat/src/share/org/apache/tomcat/core/ServletClassLoader.ja
> > > > va
> > > >
> > jakarta-tomcat.new/src/share/org/apache/tomcat/core/ServletClassLoader.java
> >
> > > ---
> > > > jakarta-tomcat/src/share/org/apache/tomcat/core/ServletClassLoader.java
> >
> > > Wed Dec 15 17:49:52 1999
> > > > +++
> > > >
> > jakarta-tomcat.new/src/share/org/apache/tomcat/core/ServletClassLoader.java
> >
> > > Sun Jan 16 17:45:04 2000
> > > > @@ -127,7 +127,7 @@
> > > >                  try {
> > > >                      String jarfile = (String) jars.elementAt(i);
> > > >                      URL jarURL = new URL(protocol,hostname,port,
> > > > -                                         basepath + jarfile);
> > > > +                                         basepath +
> > > > libpath+"/"+jarfile);
> > > >                      addURL(jarURL);
> > > >                  }catch(MalformedURLException mue) {
> > > >                  }
> > > > ----------------------- snip --------------------------
> > > >
> > > > 'hope that helps,
> > > >
> > > >         Lars
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: general-help@jakarta.apache.org
> > >
> > > --
> > > Fergus Gallagher          Tel: +44 (20) 89 87 07 17
> > > Orbis                     Fax: +44 (20) 87 42 26 49
> > > The Swan Centre           email: Fergus.Gallagher@orbisuk.com
> > > Fishers Lane              Web: http://www.orbisuk.com
> > > London W4 1RX / UK
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: general-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: general-help@jakarta.apache.org
> >
> >
>---------------------------------------------------------------------
>To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: general-help@jakarta.apache.org

--
Fergus Gallagher
Orbis
http://www.orbisuk.com/
+44-(0)20-8987 0717