The problem with this piece of code generated for my JSP by tomcat4.0b6
is that it catches Throwable t and then call
pageContext.handlePageException(t) which takse Exception  NOT throwable
!! as parameter as a result I am getting class cast exception:

org.apache.jasper.JasperException: Unable to compile class for
JSPnullD:\java\apache\tomcat4\work\localhost\usorg\_0002forgunits_jsp.ja
va:225: Incompatible type for method. Explicit cast needed to convert
java.lang.Throwable to java.lang.Exception.
            if (pageContext != null) pageContext.handlePageException(t);
                                                                     ^
1 error



==============================================================
} catch (Throwable t) {
  if (out != null && out.getBufferSize() != 0)
      out.clearBuffer();
  if (pageContext != null) pageContext.handlePageException(t);
} finally {
  if (_jspxFactory != null)
_jspxFactory.releasePageContext(pageContext);
}
==============================================================

Reply via email to