You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/01/01 12:24:58 UTC

[Bug 55943] Provide a way prevent looking at the System classloader before the webapp classloaders

https://issues.apache.org/bugzilla/show_bug.cgi?id=55943

--- Comment #1 from Mark Thomas <ma...@apache.org> ---
If this change were to be implemented then it should be implemented the same
way as the delegate flag since that controls a similar behaviour. I'd lean
towards to boolean flag that simply disabled the code block (0.2) that checked
the system class loader.

Note that the system class loader is checked first to enforce the specification
requirement that web applications must not be allowed to override Java SE
platform classes. I'd hesitate before adding an option to disable this check
because of the specification requirement.

I wonder if there isn't a better solution to this issue. The system class
loader might not be the best class loader to use here. It is really the
bootstrap class loader that is required but you can't get a reference to that
in some JREs - including Oracle's. The class loader hierarchy for an Oracle JVM
is system->ext->bootstrap so using the ext class loader would work in that
case.

I'm thinking that rather than using the system class loader in this case the
parent of the system class loader should be used (if it has one). That should
both fix this issue and still enforce the specification requirement for not
allowing the overriding of Java SE platformclasses.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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