[
https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42729
]
Antonio Petrelli commented on TILES-232:
----------------------------------------
I am starting to think it is a container (or specification?) problem.
I tested replacing the Struts action with a plain servlet that does a forward.
In fact I used the "tiles-test" webapp to do the test.
I put in the "testput_servlet.jsp" text before and after the
<tiles:insertTemplate>.
The original class "IncludingServlet" does an include, and it works well.
If I replace the "include" with a "forward", I have the same result as in the
Struts action!
I tested it with Tomcat 5.5.25 and Jetty 6.1.1rc1 (embedded in Cargo Maven
plugin).
The reason that makes me say it is a container issue is that the "response"
object, when under a JSP include, is wrapped with a
ServletResponseWrapperInclude object.
The problem is that the RequestDispatcher works exactly as a normal request
dispatcher. IMHO it should do an "include" in both "forward" and "include"
cases.
I'll contact the Tomcat developers to discuss it.
Thanks Dok, you've found a really strange bug!
> Exception thrown when using insertTemplate to insert the result of a struts
> action
> ----------------------------------------------------------------------------------
>
> Key: TILES-232
> URL: https://issues.apache.org/struts/browse/TILES-232
> Project: Tiles
> Issue Type: Bug
> Components: tiles-core
> Affects Versions: 2.0.5
> Environment: Tomcat 5.5.25, Struts 2.0.11, Tiles 2.0.5, Java 1.5, Mac
> OS X 10.4.10
> Reporter: Dok Tora
> Assignee: Antonio Petrelli
> Attachments: s2t2.war
>
>
> Inserting a struts action like this from a jsp:
> <tiles:insertTemplate template="/test2.action">
> </tiles:insertTemplate>
> Causes the result of /test2.action to be rendered rather than the calling JSP
> and the following exception is thrown:
> Nov 20, 2007 3:58:45 PM
> org.apache.tiles.servlet.context.ServletTilesRequestContext forward
> SEVERE: Servlet Exception while including path
> org.apache.jasper.JasperException: Stream closed
> ...
> Nov 20, 2007 3:58:45 PM org.apache.tiles.impl.BasicTilesContainer render
> SEVERE: Error rendering tile
> java.io.IOException: Error including path '/testlayout.jsp'. Stream closed
> Attached war file contains sample web-app, access via /s2t2/test.action.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.