title: Comparing property value in struts 2
body: <p>I want to compare a session variable with a property value in test method of struts if condition.</p>
  
  <pre><code>&lt;s:property value="band"/&gt;
  &lt;s:if test="#session.bandname == property value"&gt;
      &lt;s:form action="BandPost"&gt;
          &lt;s:textarea key="post" accesskey="post"&gt;Write a post&lt;/s:textarea&gt;
          &lt;s:submit/&gt;
      &lt;/s:form&gt; 
  &lt;/s:if&gt;
  </code></pre>
  
  <p>I want to compare the above property value in if condition with #session.bandname value. I tried many things but they are not working. Can somebody give me the answer?</p>
  
  <p>Thanks.</p>