tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bragg, Casey" <Casey.Br...@allegiancetelecom.com>
Subject Help! ErrorDispatcherValve throws NullPointerException on 403 for bidden!
Date Tue, 20 Nov 2001 22:18:52 GMT
This is a simplified followup to a previous email.  I'm completely stuck!
Please help!

On Tomcat 4.0.1, I'm getting an Error 500 caused by the following exception
when I should get a 403 forbidden error-page.

The exception : 
	2001-11-20 16:03:49 HttpProcessor[8080][4] process.invoke
	java.lang.NullPointerException
	at
org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherValve.
java:291)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:180)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1011)
	at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106
)
	at java.lang.Thread.run(Thread.java:484)


1) I added <user name="junk"   password="junk1" roles="junkrole" /> to
tomcat-users.xml.

2)I added the following to /examples/WEB-INF/web.xml (between servlet
mapping and taglib sections)

   <error-page>
      <error-code>403</error-code>
      <location>/examples/jsp/forbidden.jsp</location>
   </error-page>

3) I added the following /examples/jsp/forbidden.jsp file
	<html>
	<body>forbidden!</body>
	</html>

4)I started Tomcat 4.0.1

5)I went to http://localhost:8080/examples/jsp/security/protected/index.jsp

6) I logged in as used junk with password junk1

7) I was sent to
http://localhost:8080/examples/jsp/security/protected/j_security_check
The file catalina_log.2001-11-20.txt contained the exception listed above
(NullPointerException).

8) I restarted tomcat, and logged in again as role1 (pwd tomcat) without
difficulty.

This was done on a default installation of Tomcat 4.0.1 on a Win2k box.

==============================================
Casey Bragg - Software Engineer
Allegiance Telecom, Inc.  Dallas, TX
469-259-2702 - casey.bragg@allegiancetelecom.com
==============================================


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message