You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tiles.apache.org by "Dok Tora (JIRA)" <ji...@apache.org> on 2007/11/20 17:07:34 UTC

[jira] Created: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

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


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.


[jira] Commented: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42694 ] 

Antonio Petrelli commented on TILES-232:
----------------------------------------

Dok,
can you post the source code for the two Java classes?

Thanks.

> 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
>         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.


[jira] Commented: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Dok Tora (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42716 ] 

Dok Tora commented on TILES-232:
--------------------------------

Test2Action.java
----------------------
package test;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.Preparable;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import org.apache.struts2.config.Result;

public class Test2Action extends ActionSupport
{
  public String execute()
  {
    return Action.SUCCESS;
  }
}



> 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
>         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.


[jira] Commented: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42744 ] 

Antonio Petrelli commented on TILES-232:
----------------------------------------

The fast and dirty code that I wrote seems to work! I added a special attribute that is useful to force inclusion (instead of forward).
Now I am busy, tomorrow I think I can clean and commit the code.

> 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.


[jira] Commented: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Updated: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Petrelli updated TILES-232:
-----------------------------------

    Component/s: tiles-test
                 tiles-jsp (jsp support)

> 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, tiles-jsp (jsp support), tiles-test
>    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.


[jira] Updated: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Dok Tora (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dok Tora updated TILES-232:
---------------------------


Please note that to make this work, the struts2 filter mapping must be setup in web.xml like this:

  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
  </filter-mapping>

See

http://mail-archives.apache.org/mod_mbox/tiles-users/200711.mbox/%3cOFD5C2CB40.16E5B89C-ONC1257398.00534868-C1257398.00535D6B@amadeus.com%3e



> 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
>         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.


[jira] Assigned: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Petrelli reassigned TILES-232:
--------------------------------------

    Assignee: Antonio Petrelli

> 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.


[jira] Commented: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42734 ] 

Antonio Petrelli commented on TILES-232:
----------------------------------------

See the discussion at Tomcat Users list:
http://www.nabble.com/Including-in-a-JSP-the-result-of-a-servlet-that-forwards-tf4887974.html

> 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.


[jira] Commented: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Dok Tora (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42742 ] 

Dok Tora commented on TILES-232:
--------------------------------

Well good job uncovering the problem is in the container. 

But why does the this work for struts-tiles (1.3.8), where (although I haven't looked at the code), I presume the same chain of events takes place when the inserted tile is another action. 

This works with struts-tiles 1.3.8 in Tomcat 5.5.25:

<tiles:insert page="/somaction.do"></tiles:insert>


> 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.


[jira] Closed: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Petrelli closed TILES-232.
----------------------------------


Tiles 2.0.6 released.

> 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, tiles-jsp (jsp support), tiles-test
>    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
>             Fix For: 2.0.6
>
>         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.


[jira] Updated: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Dok Tora (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dok Tora updated TILES-232:
---------------------------

    Attachment: s2t2.war

Sample web app to demonstrate bug 232

> 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
>         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.


[jira] Commented: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42743 ] 

Antonio Petrelli commented on TILES-232:
----------------------------------------

Mmm... I changed my mind.
Though I think that there is a bug (or probably a mis-interpretation of the JSP/Servlet specifications, that are not clear in this point), I think it can be managed by Tiles.
Tiles 1 worked because the inclusion of a result was made directly by the <tiles:insert> tag, and not through a container like Tiles 2. This is the price of independence from JSP :-)
I am working on it: I am thinking of a "flag" that will be put in request scope to prevent further forwards.

> 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.


[jira] Resolved: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Antonio Petrelli (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Petrelli resolved TILES-232.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.6

Now, when an "include" operation is needed, a request attribute is set, so Tiles always includes from that point.

> 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, tiles-jsp (jsp support), tiles-test
>    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
>             Fix For: 2.0.6
>
>         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.


[jira] Commented: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Dok Tora (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42715 ] 

Dok Tora commented on TILES-232:
--------------------------------

TestAction.java
---------------------
package test;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.Preparable;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import org.apache.struts2.config.Result;

public class TestAction extends ActionSupport
{
  public String execute()
  {
    return Action.SUCCESS;
  }
}



> 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
>         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.


[jira] Issue Comment Edited: (TILES-232) Exception thrown when using insertTemplate to insert the result of a struts action

Posted by "Dok Tora (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/TILES-232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42693 ] 

doktora edited comment on TILES-232 at 11/20/07 8:34 AM:
----------------------------------------------------------

Please note that to make this work, the struts2 filter mapping must be setup in web.xml like this:

  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
  </filter-mapping>

See

http://mail-archives.apache.org/mod_mbox/tiles-users/200711.mbox/%3cOFD5C2CB40.16E5B89C-ONC1257398.00534868-C1257398.00535D6B@amadeus.com%3e

Otherwise what's rendered inside the calling JSP is:
The requested resource (/s2t2/test2.action) is not available

      was (Author: doktora):
    Please note that to make this work, the struts2 filter mapping must be setup in web.xml like this:

  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
  </filter-mapping>

See

http://mail-archives.apache.org/mod_mbox/tiles-users/200711.mbox/%3cOFD5C2CB40.16E5B89C-ONC1257398.00534868-C1257398.00535D6B@amadeus.com%3e


  
> 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
>         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.