title: iterate over two arrays in jsp using struts 2 tags
body: <p>Can Anyone help me please.
  My intention is to iterate over the two 2Dimentional arrays </p>
  
  <ol>
  <li><code>Org_Positions_IdTitle</code> which contains a)the ids of raised positions and b)their Titles. </li>
  <li><code>Org_Apps</code> which contains a)student Ids and b)ids of raised positions. </li>
  </ol>
  
  <p>So I want whenever the position Ids in the two arrays are checked equal to display the Title of the position. Thanks a lot for your help guys.  </p>
  
  <pre><code>  ResultSet ResSet_Org_Positions_IdTitle = OrgInfo.Get_Organisation_Positions_IdTitle(username,password);   
              ResultSet ResSet_Org_Apps = OrgInfo.Get_Organisation_Apps(username,password);
  
          int i=0;
          while(ResSet_Org_Positions_IdTitle.next()){ 
              Org_Positions_IdTitle[i][0] = new String(String.valueOf(ResSet_Org_Positions_IdTitle.getInt("P_Ps_Id")));
              Org_Positions_IdTitle[i][1]= new String(ResSet_Org_Positions_IdTitle.getString("Title")); i++;
              Org_Positions_IdTitle[i][0]= new String("Last");
              //System.out.println(i+":"+Org_Positions_IdTitle[i-1][j-1]+Org_Positions_IdTitle[i-1][j]);
          }
  
          int m=0; //Org_Apps A_St_Id A_Ps_Id
          while(ResSet_Org_Apps.next()){ 
              Org_Apps[m][0] = new String(String.valueOf(ResSet_Org_Apps.getInt("A_St_Id"))); 
              Org_Apps[m][1]= new String(ResSet_Org_Apps.getString("A_Ps_Id")); m++;
              Org_Apps[m][0]= new String("Last");
              //System.out.println(i+":"+Org_Positions_IdTitle[i-1][j-1]+Org_Positions_IdTitle[i-1][j]);
          }
  
          session.put("Org_Positions_IdTitle", getOrg_Positions_IdTitle());
          session.put("Org_Apps", getOrg_Apps());
  
  
  
          &lt;s:iterator value="Org_Positions_IdTitle" id="P_Ps_Id" &gt;
              &lt;s:iterator value="Org_Apps" id="A_Ps_Id" &gt;
                  &lt;s:if test="%{#P_Ps_Id==#A_Ps_Id} "&gt;
                      &lt;s:property value="Title" /&gt;        
                  &lt;/s:if&gt;
              &lt;/s:iterator&gt;
          &lt;/s:iterator&gt; 
  </code></pre>