Bug 43453 - ClassCastException at org.apache.catalina.core.StandardContext.findStatusPage(int)
Summary: ClassCastException at org.apache.catalina.core.StandardContext.findStatusPage...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 6.0.14
Hardware: Other other
: P2 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-23 13:50 UTC by Lucas Galfaso
Modified: 2007-09-23 20:45 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.