Bug 43453

Summary: ClassCastException at org.apache.catalina.core.StandardContext.findStatusPage(int)
Product: Tomcat 6 Reporter: Lucas Galfaso <lgalfaso>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 6.0.14   
Target Milestone: default   
Hardware: Other   
OS: other   

Description Lucas Galfaso 2007-09-23 13:50:20 UTC
StandardContext.java reads

    public String findStatusPage(int status) {
        return ((String) statusPages.get(new Integer(status)));
    }

This is wrong and it should be

    public String findStatusPage(int status) {
        return ((ErrorPage) statusPages.get(new Integer(status))).getLocation();
    }

Regards,
  lg
Comment 1 Tim Funk 2007-09-23 16:57:23 UTC
Ironically the suggested fix also yeilds a ClassCastException ( but would have 
been caught at compile time)

Fixed with alternative patch. 
Comment 2 Lucas Galfaso 2007-09-23 20:45:44 UTC
Sorry that the patch was not 100% correct, and thanks for fixing it.