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=33680>. 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=33680 Summary: Having a user defined "SecurityManager" class renders JasperException with reason "cannot be resolved" in JSPs. Product: Tomcat 5 Version: 5.5.7 Platform: PC OS/Version: Windows Server 2003 Status: NEW Severity: minor Priority: P4 Component: Jasper AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] I have a webapp where I've created a "SecurityManager" class of my own, which has nothing to do with the Catalina SecurityManager. Trying to use this class results in a JasperException "SecurityManager cannot be resolved". Using the exact same code, but with a different class name does not produce an error. Steps to Reproduce: Create class called SecurityManager.java as something e.g. package test; public class SecurityManager { public static int getInt() { return 1; } } Create an identical copy as SecurityManagerX.java Compile and call from a simple jsp: <%@ page import="test.*" %> <html><head><title>Testpage</title></head> <body> <%=SecurityManager.getInt()%> </body> </html> Notice how error does not appear if the SecurityManagerX class is called instead. Important: Also notice that after the error has appeared, it is possible to successfully call the SecurityManager.getInt() method for about 4-5 seconds (by reloading the page) before the error appears again (!). Actual Results: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 4 in the jsp file: /test.jsp Generated servlet error: SecurityManager cannot be resolved org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Build Date & Platform: Tomcat 5.5.7 on Win2K3. Default Catalins security policy. Perhaps this isn't a bug, but some security measure wrt the Catalina SecurityManager class. In that case it is strange that you may execute a user created SecurityManager class for a short period of times between subsequent errors. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]