You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/07/13 03:34:10 UTC

DO NOT REPLY [Bug 10766] New: - <%@ page extends %> causes ClassCastException

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10766>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10766

<%@ page extends %> causes ClassCastException

           Summary: <%@ page extends %> causes ClassCastException
           Product: Tomcat 4
           Version: Nightly Build
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper 2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: kin-man.chung@sun.com


If a JSP page extends a class using the extends directive and the class in turn
implements the HttpJspPage instead of HttpJspBase, a ClassCastException is
thrown.

The root of the problem is from line 157 of "JspServletWrapper.java":

	        return (HttpJspBase)theServlet;

which assumes that theServlet can be cast to HttpJspBase, which is not true in
this case.

I believe this change was made when background compilation was added to
jasper2.  Glenn?

The watchdog test
/jsp-tests/jsp/core_syntax/directives/page/extend/positiveExtends.jsp is a good
test case.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>