title: how to populate a drop down(<s:select) in struts2 from json response
body: <p>i am unable to populate my Struts2 select drop down in my jsp page.
  <em>Note: My jsp page loads through json response.</em>
  I have a select box inside a form. But i don't t know how to populate it when my jsp page loads.</p>
  
  <p>And in the same page i   have a select dropdown in my Struts2 jquery grid,which i am able to populage but i don't know how to populate a drop down for my form which are out side of the grid.</p>
  
  <p>Please help me regarding this issue.</p>
  
  <h2>my jsp page</h2>
  
  <pre><code>       &lt;s:url id="selecturl" action="selectaction"/&gt;  
  
  
     &lt;s:url id="bookediturl" action="bookeditt"/&gt;
     &lt;s:url  id="bookremoteurl" action="booksetups"/&gt;      
          &lt;sjg:grid
          id="bookgrid"
          formIds="form2"
          reloadTopics="reloadMyGrid"
          caption="List of Cover Details"
          dataType="json"
          href="%{bookremoteurl}"
          pager="true"
          gridModel="gridModel"
          rowList="50,100,5000"
          rowNum="20"
          filter="true"
          filterOptions="{stringResult :false,searchOnEnter : false,enableClear : true,gridModel : true}"   
          rownumbers="true"
          editurl="%{bookediturl}"
          navigator="true" 
          editinline="true" 
          navigatorSearch="false"
          autowidth="false"   
          width= "1550" 
          viewrecords="true"  
          navigatorRefresh="true"
          navigatorDelete="true"&gt;
  
  
               &lt;sjg:gridColumn name="id" index="locationId" title="ID" formatter="integer" sortable="false" key="true" 
                         search="false"  editable="true"  hidden="true"   /&gt; 
                &lt;sjg:gridColumn name="authLastname" index="authLastname" title="AuthorLastname" sortable="true" search="true" editrules="{required: true}"
                          editable="true" edittype="text" /&gt;  
  
          &lt;sjg:gridColumn name="subjectId" title="Subject Name" editable="true" sortable="false" align="center" search="false" searchtype="select" 
          searchoptions="{dataUrl:'%{selecturl}'}"  edittype="select"     editoptions="{dataUrl:'%{selecturl}'}"  /&gt;   
          &lt;/sjg:grid&gt;
  
  &lt;div id="myDivBox" style="display:none; width :300px;position: relative;top: -30px;left: 299px;button:0px;"&gt;
      &lt;s:form action="searchkeywordss" id="form2"  theme="simple" cssClass="yform"&gt;
               &lt;sj:textfield  placeholder="Enter keyword to search" cssClass="txtbox" size="42" maxLength="255" name="keywordsearch"/&gt; 
               &lt;sj:select    href="%{selecturl}"   name="countryselect" list="%{lstsub}"  listKey="id" listValue="subjectName"  theme="jquery" cssStyle="margin-top:4px;"/&gt;
               &lt;sj:a button="true" id="btnid"  cssStyle="position: relative;top: 0px;left: 09px;" onClickTopics="reloadMyGrid"&gt;Find&lt;/sj:a&gt; 
        &lt;/s:form&gt; 
  &lt;/div&gt; 
  </code></pre>
  
  <p>struts.xml</p>
  
  <pre><code> &lt;action name="booksetups" class="v.esoft.actions.bookdetails.BookdetailsAction" &gt;
        &lt;result name="success" type="json"/&gt;
        &lt;result name="login" type="redirect"&gt; /index.jsp &lt;/result&gt;
   &lt;/action&gt;   
       &lt;action name="selectaction" class="v.esoft.actions.bookdetails.SelectAction"&gt;
       &lt;result name="success"&gt;/select.jsp&lt;/result&gt;
   &lt;/action&gt;
  </code></pre>