tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: ClassCastException org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl
Date Tue, 28 Aug 2012 21:28:29 GMT
2012/8/29 Dale Ogilvie <Dale_Ogilvie@trimble.com>:
> -----Original Message-----
> From: Mark Thomas [mailto:markt@apache.org]
>
>>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.
>>
>>Mark
>
> I'm still not quite sure what you are saying matches exactly what I'm seeing Mark.


Have you ever tried to run with SecurityManager being enabled?


> So, it appears to me that the class *loading* is occurring "from" app1 in step 4. I'm
only pushing this because it kind looks "buggy" to me.

Class loading does not always use TCCL.  Sometimes it uses
"otherclass.getClassLoader()". See e.g. javadoc of
java.lang.Class#forName(String).


So it is quite valid for it to load a class from app1 even if current
TCCL belongs to app2.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message