title: having contains in struts2 iterator tag
body: <p>I have the following code which does not seem to work. I fail to see why this wont work. </p>
  
  <pre><code>&lt;s:iterator value=%{questions} id="question"&gt;
     &lt;s:if test='%{incorrectQs.contains("#question.questionId")}'&gt;
        Print something here
     &lt;/s:if&gt;
  &lt;/s:iterator&gt;
  </code></pre>
  
  <p>In the above code, basically I have a method called getQuestions in the action class.  This list contains objects of Exam class which has a get/set questionId.  I also have incorrectQs list which contains strings.  I am checking if incorrectQs contains a questionId. if it does i want to print some text. Eventhough, the above code does not work, the code below works fine randomly.  Sometimes it works and sometimes it does not...:(</p>
  
  <pre><code>&lt;s:iterator value=%{questions}&gt;
     &lt;s:if test='%{incorrectQs.contains("${questionId}")}'&gt;
        Print something here
     &lt;/s:if&gt;
  &lt;/s:iterator&gt;
  </code></pre>
  
  <p>can anyone provide some insight in this?</p>