title: Conditional form action in Struts
body: <p>I wanted to have one jsp page conditionally post to two different Struts actions.
  So I wrote this:</p>
  
  <pre><code>&lt;logic:notEmpty property="foo"&gt; 
    &lt;html:form action="modifyUser"&gt;
  &lt;/logic:notEmpty&gt;
  &lt;logic:empty property="foo"&gt; 
    &lt;html:form action="modifySelf"&gt;
  &lt;/logic:empty&gt;
  the body of the page
  &lt;/html:form&gt;
  </code></pre>
  
  <p>As a result I got this</p>
  
  <pre><code>Compilation of JSP File '/tiles/user/modify.jsp' failed:
  
  modify.jsp:8:2: No end tag found.
  &lt;html:form action="modifyUser"&gt;
   ^-------^
  modify.jsp:8:2: No end tag found.
  &lt;html:form action="modifyUser"&gt;
   ^-------^
  modify.jsp:11:2: No end tag found.
  &lt;html:form action="modifySelf"&gt;
   ^-------^
  modify.jsp:11:2: No end tag found.
  &lt;html:form action="modifySelf"&gt;
   ^-------^
  modify.jsp:109:3: No start tag found.
  &lt;/html:form&gt;
    ^-------^
  modify.jsp:109:3: No start tag found.
  &lt;/html:form&gt;
    ^-------^
  </code></pre>
  
  <p>I am guessing that the parser is looking for forms before logic, or at least matching all the tags. <p>
  Any thoughts on how to get the same effect?
  I am running within tiles also.</p>