Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 21782 invoked from network); 5 May 2000 11:14:53 -0000 Received: from web1104.mail.yahoo.com (128.11.23.124) by locus.apache.org with SMTP; 5 May 2000 11:14:53 -0000 Received: (qmail 6916 invoked by uid 60001); 5 May 2000 11:14:53 -0000 Message-ID: <20000505111453.6915.qmail@web1104.mail.yahoo.com> Received: from [136.206.1.19] by web1104.mail.yahoo.com; Fri, 05 May 2000 04:14:53 PDT Date: Fri, 5 May 2000 04:14:53 -0700 (PDT) From: Cristian Bogdan Reply-To: cristi@nada.kth.se Subject: catching exceptions raised in the included servlet To: tomcat-user@jakarta.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Hello I have sent this to sun (servlet-api-feedback and servlet-interest). since I use Tomcat as servlet container I think it should come here as well: according to the 2.2 spec, section 8.5 > Only runtime exceptions and checked exceptions of > type ServletException or > IOException should be propagated to the calling > servlet if thrown by the target of a request > dispatcher. Does that mean that if I call include(), I should be able to catch runtime exceptions raised by the called servlet? should this try block catch the runtime exception deliberately raised by the "error" servlet? try{ getServletConfig().getServletContext(). getRequestDispatcher("/servlet/error"). include(request, response); } catch (Exception ex) { ex.printStackTrace (); } This doesn't seem to happen in Tomcat 3.1 (instead, I see error 500 in included servlet). Should I expect the catch to happen in the standard? thanks Cristian __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/