Here's your problem:
> <location>/WEB-INF/jsp/exceptions/ServletException.jsp</location>
JSPs can't be run from inside the WEB-INF directory. Try moving your jsp/exceptions directory up one level.
Jerry
Wendy Smoak wrote:
From: Shapira, Yoav [mailto:[EMAIL PROTECTED] 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:
<error-page> <exception-type>javax.servlet.ServletException</exception-type> <location>/WEB-INF/jsp/exceptions/ServletException.jsp</location> </error-page>
(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
message description The server encountered an internal error () that prevented
it from fulfilling this request.
exception javax.servlet.ServletException: No data found in HOLD file
at edu.asu.vpia.webapp.PDFServlet.doGet(PDFServlet.java:94)
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?
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]