Author: bayard Date: Mon Apr 16 13:19:17 2007 New Revision: 529384 URL: http://svn.apache.org/viewvc?view=rev&rev=529384 Log: Applying patch from STR-3021. Thanks to Thomas Wilhelm for reporting the bug wherein exceptions thrown in tiles-included JSPs cause includes to happen twice. The change was to not consider an InvocationTargetException as a debug item, but as an exception whose contents need to be rethrown.
Modified: struts/struts1/branches/STRUTS_1_3_BRANCH/tiles/src/main/java/org/apache/struts/tiles/TilesUtilImpl.java Modified: struts/struts1/branches/STRUTS_1_3_BRANCH/tiles/src/main/java/org/apache/struts/tiles/TilesUtilImpl.java URL: http://svn.apache.org/viewvc/struts/struts1/branches/STRUTS_1_3_BRANCH/tiles/src/main/java/org/apache/struts/tiles/TilesUtilImpl.java?view=diff&rev=529384&r1=529383&r2=529384 ============================================================================== --- struts/struts1/branches/STRUTS_1_3_BRANCH/tiles/src/main/java/org/apache/struts/tiles/TilesUtilImpl.java (original) +++ struts/struts1/branches/STRUTS_1_3_BRANCH/tiles/src/main/java/org/apache/struts/tiles/TilesUtilImpl.java Mon Apr 16 13:19:17 2007 @@ -132,7 +132,13 @@ } catch (IllegalAccessException e) { log.debug("Could not find JSP 2.0 include method. Using old one.", e); } catch (InvocationTargetException e) { - log.debug("Unable to execute JSP 2.0 include method. Trying old one.", e); + if (e.getCause() instanceof ServletException){ + throw ((ServletException)e.getCause()); + } else if (e.getCause() instanceof IOException){ + throw ((IOException)e.getCause()); + } else { + throw new ServletException(e); + } } pageContext.include(uri);