You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Michael E. Locasto" <lo...@cs.columbia.edu> on 2002/08/23 17:14:36 UTC

4.1.9 standalone install not compiling jsp

Hello,

I'm using Tomcat 4.1.9 standalone on port 80 with JDK1.4.0 on Windows 2000.
Tomcat serves static content just fine (directory listings, and the
/tomcat-docs pages). In addition, the servlets in /examples work just fine.

However, the JSPs in /examples, the index.jsp in ROOT, and a JSP I wrote for
a test all produce the same error:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Compiling 1 source file
C:\opt\tomcat\jakarta-tomcat-4.1.9\work\Standalone\localhost\examples\jsp\co
lors\colrs_jsp.java:104: handlePageException(java.lang.Exception) in
javax.servlet.jsp.PageContext cannot be applied to (java.lang.Throwable)
      if (pageContext != null) pageContext.handlePageException(t);
                                          ^
1 error

-------------------------
I looked at the generated source of these files and the snippet that is
breaking is basically the try..catch that wraps the page code.

  try {

    /* get default jsp objects (session,application,out) */

    /* do whatever the page is trying to do */

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

The Servet API says that PageContext.handlePageException() is overloaded for
both Throwable and Exception. Perhaps I have an old copy of servlet.jar
floating around that gets included in the CLASSPATH?

any ideas?

Thanks,
Michael



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