struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vishal Jhagadiawala (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (WW-4724) s:action tag with tile result causing StackOverflowError
Date Fri, 24 Feb 2017 17:55:44 GMT

    [ https://issues.apache.org/jira/browse/WW-4724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15883195#comment-15883195
] 

Vishal Jhagadiawala edited comment on WW-4724 at 2/24/17 5:55 PM:
------------------------------------------------------------------

Hi, 
I found workaround for above issue. After debugging I found that issue is with Tiles usage
new version Struts version.
I updated tiles library with earlier version. Now I am using earlier tiles libraries - tiles
2.0 (bundled with Struts2.2.1.1) , instead of tiles2.2 (bundled with Struts2.3.28) libraries.
This works without issues. 




was (Author: vish_212):
Hi, 
I found workaround for above issue. as after debugging I found is with Tiles usage new version.

I am using earlier tiles libraries - tiles 2.0 (bundled with Struts2.2.1.1) , instead of tiles2.2
(bundled with Struts2.3.28) libraries. This works without issues. 



> s:action tag with tile result causing StackOverflowError
> --------------------------------------------------------
>
>                 Key: WW-4724
>                 URL: https://issues.apache.org/jira/browse/WW-4724
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Tags
>    Affects Versions: 2.3.30
>         Environment: windows 10, tomcat 7
>            Reporter: Vishal Jhagadiawala
>         Attachments: actionTileResult.jsp, layout.jsp, struts-tiles.xml, tiles.xml
>
>
> struts action tag used within tiles framework 
> goes in recursive loop and throws StackOverflowError as below. 
> Opening jira ticket as it's reproduced in showcase sample application, 
> The same usage worked in struts 2.2.1.1
> to reproduce invoke http://localhost:8080/showcase/tiles/index.action.
> below is  the {{tiles.xml}} , {{struts-tile.xml}} and {{layout.jsp}} as below. 
> it throws 
> {noformat}
> java.lang.StackOverflowError: null at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:230)
>          at org.apache.catalina.core.ApplicationHttpRequest.getAttribute(ApplicationHttpRequest.java:230)
at 
> {noformat}
> following is the source code. 
> Layout.jsp
> {code:html}
> <html>
> <head>
>     <title>Struts2 Showcase - <tiles:getAsString name="title"/></title>
> </head>
> <body>
>     <tiles:insertAttribute name="header"/>
>     <tiles:insertAttribute name="body"/>
>     <p>Notice that this is a layout made in JSP</p>
>     <!-- Vishal- action tag which is causing issue with tiles result --> 
>     <s:action name="myTestAction" namespace="/tiles" executeResult="true" />
> </body>
> </html>
> {code}
> tiles.xml
> {code:xml}
>     <definition name="showcase.index" template="/WEB-INF/tiles/layout.jsp">
>         <put-attribute name="title" value="Tiles Showcase"/>
>         <put-attribute name="header" value="/WEB-INF/tiles/header.jsp"/>
>         <put-attribute name="body" value="/WEB-INF/tiles/body.jsp"/>
>     </definition>
>        <!-- Vishal-- my definition -->
>     <definition name="showcase.index.actionResult" template="/WEB-INF/tiles/actionTileResult.jsp">
>         <put-attribute name="title" value="Tiles Result from action"/>
>     </definition>    
> {code}
> struts-tiles.xml
> {code:xml}
> <action name="index">
>     <result type="tiles">showcase.index</result>
>     <result name="success" type="tiles">showcase.index</result>
> </action>
> <!-- my test action to replicate the issue -->
> <action name="myTestAction">
>     <result type="tiles">showcase.index.actionResult</result>
>     <result name="success" type="tiles">showcase.index.actionResult</result>
> </action>
> {code}
> actionTileResult.jsp
> {code:html}
> <tiles:importAttribute name="title" scope="request"/>
> <html>
> <head>
>     <title>Action tile result <tiles:getAsString name="title"/></title>
> </head>
> <body>
>     <p>Notice that this is a  jsp</p>
> </body>
> </html>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message