title: How to recognize redirect and submit in struts action
body: <p>My website use struts and tiles.
  I use this link to link to register form:</p>
  
  <pre><code>&lt;a href='&lt;s:url action="register" namespace="/vtv"  /&gt;' &gt;Register&lt;/a&gt;
  </code></pre>
  
  <p>here is the register.jsp:</p>
  
  <pre><code>&lt;s:form namespace="/vtv" action="register"&gt;
          &lt;s:textfield label="Username" name="username" /&gt;
          &lt;s:textfield label="Password" name="password" /&gt;
  &lt;/s:form&gt;
  </code></pre>
  
  <p>In action, i insert the user :</p>
  
  <pre><code>public String execute() {
      String retVal = ERROR;
      try {
              MemberDAO.InsertUser(mo);
              retVal = SUCCESS;
          }
      } catch (Exception e) {
          retVal = ERROR;
      }
      return retVal;
  }
  </code></pre>
  
  <p>in tiles file, i define:</p>
  
  <pre><code>&lt;definition name="vtv.register" extends="basic"&gt;
      &lt;put-attribute name="content" value="/modules/register/register.jsp" /&gt;
  &lt;/definition&gt;
  </code></pre>
  
  <p>and in struts file:</p>
  
  <pre><code>    &lt;package name="Register" namespace="/vtv" extends="struts-default"&gt;
      &lt;result-types&gt;
          &lt;result-type name="tiles"
                       class="org.apache.struts2.views.tiles.TilesResult" /&gt;
      &lt;/result-types&gt;
      &lt;action name="register" class="vtv.action.RegisterAction"&gt;
          &lt;result name="success" type="tiles"&gt;vtv.register&lt;/result&gt;
          &lt;result name="error" type="tiles"&gt;vtv.error&lt;/result&gt;
      &lt;/action&gt;
  &lt;/package&gt;
  </code></pre>
  
  <p>My problem is how can i redirect to register page using link</p>
  
  <pre><code>&lt;a href='&lt;s:url action="register" namespace="/vtv"  /&gt;' &gt;Register&lt;/a&gt;
  </code></pre>
  
  <p>without doing the execute in action ? How can i know if this is redirect or submit ?</p>