tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Stevens <...@latchkey.com>
Subject [patch] npe in contextmanager
Date Sat, 02 Sep 2000 22:18:38 GMT
for some reason, i'm getting a NPE in contextmanger. below is a patch that
doesn't fix the problem, but at least catches the NPE better and also logs
the appropriate value for errorServlet if debugging is turned on.

now, would someone like to explain to me why i'm getting the npe in the
first place? :-)

-jon

cvs -z9 diff ContextManager.java (in directory
E:\PROJECTS\jakarta-tomcat\src\share\org\apache\tomcat\core)
Index: ContextManager.java
===================================================================
RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.jav
a,v
retrieving revision 1.127
diff -r1.127 ContextManager.java
979,980d978
<     if( debug>0 )
<         ctx.log( "Handler " + errorServlet + " " + errorPath);
985c983,986
<     req.setAttribute("javax.servlet.error.status_code",new Integer(
code));
---
>     if (errorServlet == null) {
>         ctx.log( "Handler errorServlet is null! errorPath:" + errorPath);
>         return;
>     }
986a988
>     req.setAttribute("javax.servlet.error.status_code",new Integer( code));
987a990,992
> 
>     if( debug>0 )
>         ctx.log( "Handler " + errorServlet + " " + errorPath);


-- 
http://scarab.tigris.org/    | http://noodle.tigris.org/
http://java.apache.org/      | http://java.apache.org/turbine/
http://www.working-dogs.com/ | http://jakarta.apache.org/velocity/
http://www.collab.net/       | http://www.sourcexchange.com/



Mime
View raw message