tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 4114] New: - examples app and java security manager.
Date Fri, 12 Oct 2001 06:20:27 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4114>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4114

examples app and java security manager.

           Summary: examples app and java security manager.
           Product: Tomcat 3
           Version: 3.3 Release Candidate 1
          Platform: Other
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: mike@ds808.net


Downloaded and running default (as distributed) 3.3 rc1 under -sandbox.
The following examples jsp's display security manager access problem.  I've 
included the stack and additional comments below.  NB: All other jsp and 
servlets in the /examples app work fine.

jsp-servlet-jsp
forward
include
errorpage - only if error page is invoked.

Here is the following error msg:
Root cause:
java.security.AccessControlException: access denied 
(java.lang.RuntimePermission setContextClassLoader)
	at java.security.AccessControlContext.checkPermission
(AccessControlContext.java:272)
	at java.security.AccessController.checkPermission
(AccessController.java:399)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
	at java.lang.Thread.setContextClassLoader(Thread.java:1140)
	at org.apache.tomcat.util.compat.Jdk12Support.setContextClassLoader
(Jdk12Support.java:115)
	at org.apache.tomcat.modules.generators.Jdk12Interceptor.postServletInit
(Jdk12Interceptor.java:102)
	at org.apache.tomcat.facade.ServletHandler.init(ServletHandler.java:260)
	at org.apache.tomcat.facade.ServletHandler.service
(ServletHandler.java:419)
	at org.apache.tomcat.facade.RequestDispatcherImpl.doForward
(RequestDispatcherImpl.java:270)
	at org.apache.tomcat.facade.RequestDispatcherImpl.access$100
(RequestDispatcherImpl.java:103)
	at org.apache.tomcat.facade.RequestDispatcherImpl$RDIAction.run
(RequestDispatcherImpl.java:571)
	at org.apache.tomcat.util.compat.Jdk12Support$PrivilegedProxy.run
(Jdk12Support.java:183)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.tomcat.util.compat.Jdk12Support.doPrivileged
(Jdk12Support.java:100)
	at org.apache.tomcat.facade.RequestDispatcherImpl.forward
(RequestDispatcherImpl.java:167)
	at org.apache.jasper.runtime.PageContextImpl.forward
(PageContextImpl.java:423)
	at jsp.jsptoserv.jsptoservlet_1._jspService(jsptoservlet_1.java:57)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	at org.apache.tomcat.facade.ServletHandler.doService
(ServletHandler.java:484)
	at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
	at org.apache.tomcat.core.Handler.service(Handler.java:235)
	at org.apache.tomcat.facade.ServletHandler.service
(ServletHandler.java:432)
	at org.apache.tomcat.core.ContextManager.internalService
(ContextManager.java:915)
	at org.apache.tomcat.core.ContextManager.service
(ContextManager.java:831)
	at org.apache.tomcat.modules.server.Http10Interceptor.processConnection
(Http10Interceptor.java:161)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:477)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:517)
	at java.lang.Thread.run(Thread.java:484)
= = = = = = = = = = = = = = = = = = = = = = = = = 

COMMENTS:
The only way i could get it to work was to slip the following statement into 
tomcat.policy:

grant codeBase "file:${tomcat.home}/webapps/examples/-" {
    permission java.security.AllPermission;
};

Mime
View raw message