tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <...@teamware.com>
Subject Jasper Exception with security and login.jsp
Date Wed, 16 May 2001 12:03:41 GMT
Hi,

Runnong tomcat 3.2.2b4 using a slightly modified form of Hello world
example servlet I get an exception.  

I am trying to access a protected resource and it is redirecting to the
login.jsp.  Rather than display the login page it results in an
exception.  The tomcat log shows an AccessControlException

------------------------------------
2001-05-16 02:56:47 - ContextManager: AccessInterceptor: checking
/jsp/security/login/login.jsp
java.lang.ExceptionInInitializerError:
java.security.AccessControlException: access denied
(java.util.PropertyPermission line.separator read)
        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.SecurityManager.checkPropertyAccess(SecurityManager.java:1278)
        at java.lang.System.getProperty(System.java:560)
        at
org.apache.jasper.runtime.JspWriterImpl.<clinit>(JspWriterImpl.java:385)
        at
org.apache.jasper.runtime.PageContextImpl._createOut(PageContextImpl.java:467)
        at
org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:181)
        at
org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:149)
        at
org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:99)
        at
jsp.security.login._0002fjsp_0002fsecurity_0002flogin_0002flogin_0002ejsplogin_jsp_0._jspService(_0002fjsp_0002fsecurity_0002flogin_0002flogin_0002ej
splogin_jsp_0.java:49)
---------------------------------------

I can give myself access permissions, however, this then causes a
NullPointerException to be displayed in the browser.  The 'Root cause'
shows a NullPointerException from

---------------
java.lang.NullPointerException
        at
org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:111)
        at
jsp.security.login._0002fjsp_0002fsecurity_0002flogin_0002flogin_0002ejsplogin_jsp_0._jspService(_0002fjsp_0002fsecurity_0002flogin_0002flogin_0002ejsplogin_jsp_0.java:67)
---------------

The login.jsp compiled code error line is

        } finally {
            if (out != null) out.flush();
            if (_jspxFactory != null) 
                _jspxFactory.releasePageContext(pageContext);
        }

Is this a known problem with an access control failure during an
authentication request.

Full exception details shown below.

Rgds
Antony
-- 
Antony Bowesman
Teamware Group 
adb@teamware.com
tel: +358 9 5128 2562
fax: +358 9 5128 2705


Error: 500

Location: /helloweb/jsp/security/login/login.jsp

Internal Servlet Error:

org.apache.jasper.JasperException
        at
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:132)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
        at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
        at org.apache.tomcat.core.Handler.service(Handler.java:287)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
        at java.lang.Thread.run(Thread.java:484)

Root cause: 

java.lang.NullPointerException
        at
org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:111)
        at
jsp.security.login._0002fjsp_0002fsecurity_0002flogin_0002flogin_0002ejsplogin_jsp_0._jspService(_0002fjsp_0002fsecurity_0002flogin_0002flogin_0002ejsplogin_jsp_0.java:67)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
        at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
        at org.apache.tomcat.core.Handler.service(Handler.java:287)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
        at java.lang.Thread.run(Thread.java:484)

Mime
View raw message