title: How to check if List contains the particular element or not in Struts2?
body: <p>I have tried to check if the List contains particular element or not using Struts 2 in <code>&lt;s:if&gt;</code> tag?</p>
  
  <pre class="lang-default prettyprint-override"><code>&lt;display:table class="noheader-border" id="data" name="lstAttendance" sort="list"
                 uid="row" htmlId="sources" export="false"&gt;
      &lt;display:column style="width:150px"&gt;
          &lt;s:property value="%{#attr.row.worker.workerName}" /&gt;
      &lt;/display:column&gt;
      &lt;display:column style="width:10px;weight:bold;"&gt;:&lt;/display:column&gt;
      &lt;s:if test="lstSalaryDefinedWorkerId.contains(%{#attr.row.workerId})"&gt;
          ...
      &lt;/s:if&gt;
  ...
  </code></pre>