You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Christopher Cheng <ch...@skywidetech.com> on 2007/12/12 08:46:49 UTC
tiles and waitAndExec working together?
I have a problem of having tiles and waitAndExec working together.
WaitAndExec and the tag <s:url> cannot generate the action request correctly
on the wait page.
On the wait page "wait.jsp" <s:url> uses the tiles template file
"http://localhost:8080/jsp/layout/layout.jsp" as the URL
instead of http://localhost:8080/action1.action
search.jsp:
<s:form action="action1!list" method="post" onsubmit="return checkForm();"
theme="simple">
.............
</s:form>
struts.xml:
<action name="action1" class="com.mycompany.Action1" method="input">
<interceptor-ref name="completeStack"/>
<interceptor-ref name="execAndWait">
<param name="delay">10</param>
<param name="delaySleepInterval">50</param>
</interceptor-ref>
<result name="success" type="tiles">success</result>
<result name="wait" type="tiles">wait</result>
</action>
tiles.xml:
<definition name="layout" template="/jsp/layout/layout.jsp">
<put-attribute name="header" value="/jsp/layout/header.jsp"/>
<put-attribute name="menu" value="/jsp/layout/menu.jsp"/>
<put-attribute name="body" value="/jsp/layout/body.jsp"/>
<put-attribute name="footer" value="/jsp/layout/footer.jsp"/>
</definition>
<definition name="wait" extends="layout">
<put-attribute name="body" value="/jsp/wait.jsp"/>
</definition>
wait.jsp:
<%@ taglib uri="/struts-tags" prefix="s" %>
<html>
<head>
<title>Please wait</title>
<meta http-equiv="refresh" content="5;url=<s:url includeParams="all"
/>"/>
</head>
<body>
Please wait while we process your request.<br/>
Click <a href="<s:url includeParams="all" />">Here</a> if this page does
not reload automatically.
</body>
</html>
</pre>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: tiles and waitAndExec working together?
Posted by Christopher Cheng <ch...@skywidetech.com>.
JIRA Issue created:
https://issues.apache.org/struts/browse/WW-2375
"Antonio Petrelli" <an...@gmail.com> wrote in message
news:aae96ca0712120026u6a488509u311b9ed5b7bf513@mail.gmail.com...
> 2007/12/12, Christopher Cheng <ch...@skywidetech.com>:
>>
>> I have a problem of having tiles and waitAndExec working together.
>> WaitAndExec and the tag <s:url> cannot generate the action request
>> correctly
>> on the wait page.
>>
>> On the wait page "wait.jsp" <s:url> uses the tiles template file
>> "http://localhost:8080/jsp/layout/layout.jsp" as the URL
>> instead of http://localhost:8080/action1.action
>
> Mmm... it seems like a bug, probably in the Struts 2/Tiles 2 plugin.
> Please open a JIRA issue for this:
> https://issues.apache.org/struts/browse/WW
> And, if you want, you can post a patch :-)
>
> Ciao
> Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: tiles and waitAndExec working together?
Posted by Antonio Petrelli <an...@gmail.com>.
2007/12/12, Christopher Cheng <ch...@skywidetech.com>:
>
> I have a problem of having tiles and waitAndExec working together.
> WaitAndExec and the tag <s:url> cannot generate the action request correctly
> on the wait page.
>
> On the wait page "wait.jsp" <s:url> uses the tiles template file
> "http://localhost:8080/jsp/layout/layout.jsp" as the URL
> instead of http://localhost:8080/action1.action
Mmm... it seems like a bug, probably in the Struts 2/Tiles 2 plugin.
Please open a JIRA issue for this:
https://issues.apache.org/struts/browse/WW
And, if you want, you can post a patch :-)
Ciao
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: tiles and waitAndExec working together?
Posted by Christopher Cheng <ch...@skywidetech.com>.
My success tiles is like this:
<definition name="success" extends="layout">
<put-attribute name="body" value="/jsp/success.jsp"/>
</definition>
"Antonio Petrelli" <an...@gmail.com> wrote in message
news:aae96ca0712120002u67d43075t489fc7d8af4221bf@mail.gmail.com...
> 2007/12/12, Christopher Cheng <ch...@skywidetech.com>:
>>
>> <result name="success" type="tiles">success</result>
>> ...
>> <definition name="layout" template="/jsp/layout/layout.jsp">
>> <put-attribute name="header" value="/jsp/layout/header.jsp"/>
>> <put-attribute name="menu" value="/jsp/layout/menu.jsp"/>
>> <put-attribute name="body" value="/jsp/layout/body.jsp"/>
>> <put-attribute name="footer" value="/jsp/layout/footer.jsp"/>
>> </definition>
>> <definition name="wait" extends="layout">
>> <put-attribute name="body" value="/jsp/wait.jsp"/>
>> </definition>
>
>
>
> Where is the "success" Tiles definition?
>
> Ciao
> Antonio
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: tiles and waitAndExec working together?
Posted by Antonio Petrelli <an...@gmail.com>.
2007/12/12, Christopher Cheng <ch...@skywidetech.com>:
>
> <result name="success" type="tiles">success</result>
> ...
> <definition name="layout" template="/jsp/layout/layout.jsp">
> <put-attribute name="header" value="/jsp/layout/header.jsp"/>
> <put-attribute name="menu" value="/jsp/layout/menu.jsp"/>
> <put-attribute name="body" value="/jsp/layout/body.jsp"/>
> <put-attribute name="footer" value="/jsp/layout/footer.jsp"/>
> </definition>
> <definition name="wait" extends="layout">
> <put-attribute name="body" value="/jsp/wait.jsp"/>
> </definition>
Where is the "success" Tiles definition?
Ciao
Antonio