tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: ClassCastException org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl
Date Mon, 27 Aug 2012 23:50:03 GMT
On 21/08/2012 23:35, Dale Ogilvie wrote:
>> -----Original Message----- From: Pid * []
>> Where is that dependency JSP jar from? It should not be in
>> WEB-INF/lib if it's providing JSP functionality.
>> p
> The manifest for the jar says "JSP 2.1 Jasper implementation from
> Glassfish", and yeah it was bad practice for maven to include that in
> our app2 for us.
> Regardless of where the jar is coming from, it still seems bad to me
> that Tomcat will respond to my request of app1 by loading a class
> from app2/WEB-INF/lib/jsp-2.1-6.1.14.jar.
> I think Mark Thomas was saying that Tomcat was preventing loading of
> classes outside of Tomcat and app1, the vm classloading output seems
> to suggest otherwise.

Not quite. My point was the loading of the EL implementation is likely
to be triggered by user code. If the webapp class loader is the TCCL
loader than classes from the web app will be loaded before those from
the container. If the web app contains container classes then it is
possible that they get loaded from the webapp rather than from Tomcat.
(Enabling the security manager enables additional class loading checks
that would stop this). Those classes from the webapp then have
references held to them. They will work right up unto the point Tomcat
tries to access the class outside of the webapp they were loaded from.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message