Thursday, August 30, 2012

Apache Tiles 2.2 error handling in Websphere Application Server 7

When using Apache Tiles 2.2 in Websphere 7 application, by default the JSP engine renders the response tile-by-tile. When exception happens in one tile and there is error page defined, only the offending tile is rendered with the error page, the others are just rendered fine.

To change this behaviour to allow exceptions to bubble up to the including JSP and forwad to the error page, there are two things need to be done:

1) Set the container custom property to true. This property is avaiable from WAS Fixpack Details can be found from and

2) Define an errorPage for the template jsp, as shown in below.

<%@ page errorPage="/jsp/general/error.jsp" %>

<%@ taglib uri="" prefix="tiles" %>

<tiles:insertAttribute name="header" />

<tiles:insertAttribute name="body" />

<tiles:insertAttribute name="footer" /> 

1 comment: