> > > In Tomcat 4, the following rules are applied:
> > > * If the included servlet throws ServletException or IOException,
> > > propogate it on to the calling servlet (i.e. no error page behavior).
> > > * If the included servlet throws any other exception (such as
> > > NullPointerException), wrap it in a ServletException and propogate
> > > that to the calling servlet (i.e. no error page behavior).
> >
> > Great, I'll do something similar in tomcat3.3.
> >
> > My only issue is with the special treatement of RuntimeExceptions - is
> > there a need to wrap them with ServletException ? I would treat
> > included servlets in the same way as "normal" servlets ( from error
> > handling perspective).
> >
>
> Just the spec requirement (Section 8.5 for 2.3 PFD; I'm sure the 2.2 spec had a
> similar statement.
???
Section 8.5 in 2.3 PFD says:
"Only runtime exceptions and checked exceptions of type ServletException
and IOException should be propagated ... if thrown by the target of
RequestDispatcher. All other exceptions should be wrapped ... "
My understanding of this is that NullPointerException should be
propagated, not wrapped, same for security and any other RuntimeException.
Costin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]