tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Petrelli" <antonio.petre...@gmail.com>
Subject Re: Tiles error once session times out
Date Thu, 04 Sep 2008 16:12:24 GMT
2008/9/4 Maisano, Ben J <benjamin_j_maisano@uhc.com>:
> however to my surprise the rest
> of the jsp still got processed after a redirect had been issued using
> reponse.sendRedirect("login.jsp");.  I ended up putting that whole page
> in a if else block to prevent such processing after a redirect.  Still
> one question, why did the web container not catch the Tiles exeception
> as configured:
>
>        <error-page>
>
> <exception-type>org.apache.tiles.definition.NoSuchDefinitionException</e
> xception-type>
>        <location>/login.jsp</location>
>    </error-page>
>
> ??

It depends on your JEE container, since it is caught by it, as you can
see from the stack trace:

<snip>
[9/3/08 13:22:58:164 EDT] 00000025 ServletWrappe E   SRVE0068E: Uncaught
exception thrown in one of the service methods of the servlet:
/jsf/common/jsfTileNavigator.jsp. Exception thrown :
javax.servlet.ServletException: Error executing tag: null
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:658)
 at
com.ibm._jsp._jsfTileNavigator._jspService(_jsfTileNavigator.java:150)
 at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
 at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.ja
va:1075)
</snip>

>  I noticed the tiles servlet doesn't have a mapping in the web.xml,
> and I also saw the apache website mention this is not needed, as its
> only for initialization.  Wondering if that is the reason tiles
> exceptions aren't caught by web container error-page config?

Nope.

>  When is
> tiles actually getting called, I would think it would be caught.

Tiles is called usually from JSP pages. Some containers process JSP
files and, sometimes, they flush the stream, so you don't see a stack
trace as a web page, but only a semi-rendered page.

Antonio

Mime
View raw message