> > My preference would be to fix the test and throw exceptions from
> > include(). On the other side this changes the behavior of tomcat - and I
> > need a second opinion. If indeed the include() is supposed to throw the
> > exception, then it's a spec issue and the previous behavior doesn't
> > matter.
> >
> 
> 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). 

( I'm thinking of Security exceptions - all of them are Runtime, and the
"common" behavior is to catch them if you expect them. )

In any case, this is a minor detail ( compared with the decision to throw
or not).

Costin 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to