After adding the jdom.jar and making the server.xml changes
you describe, I find that I can compile and display the
following JSP page:

----- test.jsp -----
<%
    org.jdom.JDOMException jdomExc = new org.jdom.JDOMException();
%>
This is a test.
--------------------

This seems to indicate that the jdom.jar is available to
the web application.  I also tried a simple servlet which was
loaded on startup.  It too was successful.  It is likely that
your NoClassDefFound is due to a class in a lower classloader
that requires jdom.jar to be visible.  Using additionalJars
is equivalent to putting the jar in the WEB-INF/lib of all
web applications.  It offers the same visibility.

Cheers,
Larry

> -----Original Message-----
> From: Mario Felarca [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, May 20, 2002 12:38 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Tomcat 3.3.1 and additionalJars
> 
> 
>  >From: Larry Isaacs <[EMAIL PROTECTED]>
>  >
>  >That's basically correct.  The jar is added to the
>  >web application's classloader classpath.  The web
>  >application's classloader is switched in as the context
>  >class during request handling for that context.
>  >
>  >Larry
> 
> Ok, I just wanted to make sure of that. So I have my context 
> classes in a 
> jar that reside under my docBase/WEB-INF/lib directory. I place the 
> "shared" jdom.jar under the Tomcat/lib/container directory, and in my 
> server.conf file I make the following changes to LoaderInterceptor11.
> 
> additionalJars="jdom.jar"
> jarSeparator=";"
> 
> When I start tomcat up, it starts to load my context which 
> has a couple of 
> LoadOnStartup specified servlets. This servlets fail to load with a 
> NoClassDefFound Exception because the context can't find 
> org/jdom/JDOMException.
> 
> Can you think of anything else I can try or do in order to make the 
> additionalJars property work? I feel like this should work 
> and that this 
> feature should be doing exactly what I want it to be doing, 
> unfortunately I 
> have yet to see it function.
> 
> Thanks in advance,
> 
> Mario-
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to