From df0084419b2ff9b4f35f17e0c7cba4a3d1bcf21b Mon Sep 17 00:00:00 2001 From: Antonio Petrelli Date: Wed, 18 Jul 2007 18:23:36 +0000 Subject: [PATCH] WW-1724 Merged from trunk to 2_0_X branch. The request context for Struts 2 - Tiles 2 integration tries to dispatch the request if possible. It includes it only if the response has been committed, or if it is a FreeMarker request (this must be fixed). git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@557352 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/struts2/tiles/StrutsTilesRequestContext.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesRequestContext.java b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesRequestContext.java index f0632ffae..747e4e3fb 100644 --- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesRequestContext.java +++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesRequestContext.java @@ -79,7 +79,12 @@ public class StrutsTilesRequestContext extends TilesRequestContextWrapper { } public void dispatch(String include) throws IOException { - include(include); + if (include.endsWith(mask)) { + // FIXME This way FreeMarker results still don't have a content-type! + include(include); + } else { + super.dispatch(include); + } } /**