title: Are compound if statements possible with Struts2 <s:if> tag?
body: <p>I have a page that will display one of two options for a Struts2 JSP.<br>
  The problem I am running in to is that I have have to continually nest my  statements because I cannot figure out how create compound if statements with this tag.
  Currently my code looks like this:</p>
  
  <pre><code>&lt;s:if test="%{caseDto.siteId!=null}"&gt;
      &lt;s:if test="%{caseDto.siteId!=0}"&gt;
          &lt;span id="validAcctSpan" class="goodMessage"&gt;
              &lt;s:textfield name="caseDto.siteId" label="Account Number"
  </code></pre>
  
  <p>...</p>
  
  <p>I would like to know if Struts supports a syntax of something along the lines of:</p>
  
  <pre><code>&lt;s:if test="%{caseDto.siteId!=null &amp;&amp; caseDto.siteId!=0}"&gt;
      &lt;span id="validAcctSpan" class="goodMessage"&gt;
          &lt;s:textfield name="caseDto.siteId" label="Account Number"
  </code></pre>
  
  <p>...</p>
  
  <p>Is this possible? I'm open to other/better ways of performing the same action. I am still new to Struts2, so I'm sure there is a better way.</p>