Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2375

tiles and waitAndExec cannot work together

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 2.0.11
    • Fix Version/s: 2.1.1
    • Component/s: Plugin - Tiles
    • Labels:
      None
    • Environment:

      Resin 3.0.23, JDK 1.6.02, Windows XP/Linux

      Description

      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>

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              christophercheng Christopher Cheng
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: