Timothy Bennett wrote:
Here's something that I discovered yesterday about the classloader that kinda surprised me. Maybe some of you merlin contributors can comment on it...
I have a container that deploys the Jetty-Phoenix block. The classloader for this container includes the jasper-compiler.jar, jasper-runtime.jar, and the javax-servlet.jar in order to support JSPs. The Jetty-Phoenix block supports deployment of web applications. I deployed a WAR in my Jetty-Phoenix yesterday that included some JSP. The JSP compiled fine, but when the JSP was attempted to execute, it could not resolve classes in the jasper-runtime or the servlet.jar.
Is it possible to get this code into the sandbox to get a better idea of what is happening?
I finally got it working by deploying the jasper-runtime.jar and servlet.jar
in the WEB-INF/lib directory of my web app WAR. It seems that the
jasper-runtime and servlet jars weren't visible to the web application from
the merlin container classloader, although the jasper-compiler jar was when
the Jetty-Phoenix initially compiled the JSP to Java code.
Just to confirm - the actual compilation is being executed by a component under merlin - right?
Thinking I might need a more "global" classloader than the container's, I tried moving the jasper-runtime and servlet jars to the merlin/ext directory, but that help either. Only including them in the web apps WEB-INF/lib directory makes them visible to the executing JSP code. I think that is strange.
Where are you loading the merlin jars from?
If I run Jetty or Tomcat as standalone servers, I don't have to put those jars in the webapps classloader, as they distributed as part of the server's own common lib. I might have to go back and test this, but I think by including those jars in the SAR file when I deploy the Jetty-Phoenix block in a Phoenix container, I don't have to include them in the webapps classloader either.
Any comments? Is this expected behavior?
Cannot say based on info available. I'm assuming that your running a web server as a component under merlin. In such a scenario the inclusion of the jar files such as servlet, etc. in the container classloader should be fine.
Getting a look at some of this would hep a lot.
--
Stephen J. McConnell mailto:[EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
