in WEB-INF/web.xml, <error-page> <exception-type> moreservlets.DumbDeveloperException </exception-type> <location>/DDE.jsp</location> </error-page> when DumbDeveloperException happens,cannot invoke dde.jsp. Tomcat4.1.24,anything esle is ok.
Several possible problems: 1.) It's case sensitive. Try.. <location>/dde.jsp</location> 2.) What exception are you throwing? You can only throw ServletException and IOException (and RuntimeException + subclasses of). So if you're trying to throw a DDException, you need to wrap it inside a ServletException.
The container will know to call ServletException.getRootCause(), see it as a DDException, match it with what you have in the web.xml and send the appropriate error page.
when RiskyPage.jsp doesn't throw a exception,it's OK; when it throws a exception, the result is org.apache.jasper.JasperException: Duh. What was I *thinking*? at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) ................ What is the reason?