Hello,
It looks like the web server do an error catching on a request basis rather than on a "include" basis. When you use the server general mechanism, via a declaration in web.xml, the exception is catch by the top level page where the request start. As Tiles insert mechanism catch any exceptions and render it in place of the inserted tiles, the server can't see it. When you use the exception catch mechanism on a page basis, the server can catch it before the Tiles insert, and use your error page as expected. Cedric Tony wrote: > I have a problem when I try to use the following statement in my web.xml > file with tiles: > > <error-page> > <exception-type>java.lang.NullPointerException</exception-type> > <location>/ErrorPage.jsp</location> > </error-page> > > I took the tiles-blank-struts1-1 war and added the above line. I then > modified the body.jsp file to throw a NullPointerException. When I go > to the index.jsp which does a 'tiles:insert' on the body.jsp, the > exception came to the screen instead of taking me to the ErrorPage.jsp. > If I go directly to the body.jsp it works correctly or if I add <%@ page > errorPage="/ErrorPage.jsp" %> to the top of body.jsp. I tried > increasing the buffer size of the index.jsp and setting flush to false > but with the same results. Any help would be appreciated. > > Thanks, > Tony > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>