You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Etienne Deleflie <et...@proxima-tech.com> on 2002/01/07 23:30:43 UTC
jar loader / precedence / order
Hello list,
I am using tomcat 4.
I have all my jars in the WEB-INF/lib folder of my web-app. The thing
is, they need to be loaded in a specific order.
What is the default order for loading jar files in the same directory
........... alphabetical ? date ? ....
can I set a CLASSPATH variable for a webapp ? ......... to instruct the
webapp to load the classes in a specific order ?
etienne
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: jar loader / precedence / order
Posted by Remy Maucherat <re...@apache.org>.
> Remy Maucherat wrote:
>
> >Do you mean you want to override some classes from one JAR ? If so, you
> >should extract the overriding classes and put them in /WEB-INF/classes,
so
> >that your application is actually portable.
> >
> .......... that's a good point, can I separate the jars into 2 different
> directories, so that certain ones are loaded first ?
>
> can I put a jar in the classes directory (or anywhere else )?
No, you have to extract it.
Only put the classes that you want to have loaded first in /WEB-INF/classes.
Remy
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: jar loader / precedence / order
Posted by Etienne Deleflie <et...@proxima-tech.com>.
Remy Maucherat wrote:
>>Hello list,
>>
>>I am using tomcat 4.
>>
>>I have all my jars in the WEB-INF/lib folder of my web-app. The thing
>>is, they need to be loaded in a specific order.
>>
>>What is the default order for loading jar files in the same directory
>>........... alphabetical ? date ? ....
>>
>
>It's alphabetical.
>
>>can I set a CLASSPATH variable for a webapp ? ......... to instruct the
>>webapp to load the classes in a specific order ?
>>
>
>No, you can't do that.
>
>Do you mean you want to override some classes from one JAR ? If so, you
>should extract the overriding classes and put them in /WEB-INF/classes, so
>that your application is actually portable.
>
.......... that's a good point, can I separate the jars into 2 different
directories, so that certain ones are loaded first ?
can I put a jar in the classes directory (or anywhere else )?
etienne
>
>
>Remy
>
>
>--
>To unsubscribe: <ma...@jakarta.apache.org>
>For additional commands: <ma...@jakarta.apache.org>
>Troubles with the list: <ma...@jakarta.apache.org>
>
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: jar loader / precedence / order
Posted by Remy Maucherat <re...@apache.org>.
> Hello list,
>
> I am using tomcat 4.
>
> I have all my jars in the WEB-INF/lib folder of my web-app. The thing
> is, they need to be loaded in a specific order.
>
> What is the default order for loading jar files in the same directory
> ........... alphabetical ? date ? ....
It's alphabetical.
> can I set a CLASSPATH variable for a webapp ? ......... to instruct the
> webapp to load the classes in a specific order ?
No, you can't do that.
Do you mean you want to override some classes from one JAR ? If so, you
should extract the overriding classes and put them in /WEB-INF/classes, so
that your application is actually portable.
Remy
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: jar loader / precedence / order
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Tue, 8 Jan 2002, Etienne Deleflie wrote:
> Date: Tue, 08 Jan 2002 09:30:43 +1100
> From: Etienne Deleflie <et...@proxima-tech.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: jar loader / precedence / order
>
> Hello list,
>
> I am using tomcat 4.
>
> I have all my jars in the WEB-INF/lib folder of my web-app. The thing
> is, they need to be loaded in a specific order.
>
> What is the default order for loading jar files in the same directory
> ........... alphabetical ? date ? ....
>
> can I set a CLASSPATH variable for a webapp ? ......... to instruct the
> webapp to load the classes in a specific order ?
>
There's no guarantees on loading order of JAR files within /WEB-INF/lib.
The only guarantee you get is that the container will try unpacked classes
under /WEB-INF/classes before *any* class from a JAR file in /WEB-INF/lib.
In the rare cases where I needed to override something in a JAR (which is
a poor design pattern, IMHO), I have done it this way.
For Tomcat 4, the same policy is true for the other classloaders -- for
example, there's no guarantee on the load order of JAR files in
"common/lib", but Tomcat does guarantee to look in "common/classes" first.
> etienne
>
Craig
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>