tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <>
Subject Tomcat error-page not working (was: RE: Tomcat and checked vs. unchecked exceptions)
Date Tue, 24 Feb 2004 22:19:34 GMT
> From: Shapira, Yoav [] 
> Try <exception-type>java.lang.RuntimeException</exception-type>, as
> that's the superclass for unchecked exceptions and you 
> probably want to
> handle them all the same (if you want to handle them at all, which
> apparently you do).

I don't understand. :(  I don't know if this is related to the original
question, but I have this in web.xml:


(in the appropriate place, at the bottom just above </web-app>)

When this code executes:
   if ( report == null || report.equals( "" ) ) {
      log.debug( "doGet: no data!  Need to forward to an error page." );
      throw new ServletException( "No data found in HOLD file" );

I _still_ get this in the browser:

type Exception report
description The server encountered an internal error () that prevented
it from fulfilling this request.
javax.servlet.ServletException: No data found in HOLD file
	at edu.asu.vpia.webapp.PDFServlet.doGet(

Yansheng Lin suggested using Struts declarative exception handling, but
this is a plain-old Servlet, not a Struts Action.

The same <error-page> tag works fine in a different webapp, I'm at a
loss as to why it fails in this one.  The JSP is present in the location
given in the tag.

What am I missing, why do I get a Tomcat-generated error page and not
the JSP I specified?

Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message