From 522961d993b65b4cc3ee764c5d76094c8aa0358e Mon Sep 17 00:00:00 2001 From: Antonio Petrelli Date: Thu, 8 Feb 2007 16:40:27 +0000 Subject: [PATCH] WW-1724 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/trunk@504948 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 2973547ee..378d9cb4e 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 @@ -80,7 +80,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); + } } /**