DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=30306.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=30306
JasperLoader throws NPE (wrapped in a j.s.PAE) on non-existant securityManager
Summary: JasperLoader throws NPE (wrapped in a j.s.PAE) on non-
existant securityManager
Product: Tomcat 4
Version: 4.1.30
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
The source of org.apache.jasper.servlet.JasperLoader contains abug around line#
179 where it says:
if (System.getSecurityManager() != null) {
where it should be:
if (securityManager != null) {
in rare occasions (thay actually do happen!) the instance variable
securityManager is NULL when the class is instantiated, but when a class is
loaded through this classloader and somehow the System.getSecurityManager() is
set, an NPE is thrown (wrapped in a java.security.PriveligedActionException).
Could you patch this please for a Tomcat 4.1.31 release? ;-)
I don't know what exactly triggered this bug - basically, that
System.getSecurityManager() is null initially and gets an assignment later. The
Tomcat5 (Jasper2) version does not have this bug, and has this very patch applied.
We have a JSP with a JSTL forEach tag, and nested in that tag another (custom)
tag. When the JSP is executed in the JVM (after it is successfully compiled) the
NPE is thrown while executing (preparing, actually) the forEach tag.
We found a workaround by executing our custom tag before the forEach body in
HTML comment ;-) which seemed to solve the problem. Patching Jasper works
better, of course, but my co-workers don't want a custom patched Tomcat for a
webapp to work :-(
Thanks in advance for patching Jasper!
Bart Guijt
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]