title: Struts2 jquery autocompleter with JSON
body: <p>I'm using atocompleter in my form with json.
  This is the part of my struts.xml</p>
  
  <pre><code>   &lt;package name="default" extends="struts-default,json-default"&gt;
  
      &lt;action name="jsonSample" class="com.jaisar.jsep.product.web.action.DatabaseJSON" method="getDatabaseJSONData" &gt;
           &lt;result type="json"/&gt;
      &lt;/action&gt;
  &lt;/package&gt;
  </code></pre>
  
  <p>My jsp page is :</p>
  
  <pre><code>&lt;%@ taglib prefix="s" uri="/struts-tags" %&gt;
  &lt;%@ taglib prefix="sj" uri="/struts2-jquery-tags"%&gt;
  
  &lt;s:url id="remoteurl" action="jsonSample.action"/&gt;
      &lt;sj:select
      href="%{remoteurl}"
      id="echo"
      name="echo"
      list="languageList"
      emptyOption="true"
      headerKey="-1"
      headerValue="Please Select a Language"/&gt;
  </code></pre>
  
  <p>Action class method is :</p>
  
  <pre><code>public class DatabaseJSON  extends ActionSupport {
      private List&lt;String&gt; languageList;
  public String getDatabaseJSONData()  {
          languageList = new ArrayList&lt;String&gt;();
          languageList.add("Java");
          languageList.add("PHP");
          languageList.add("C#");
          return SUCCESS;
      }
  // Setters and getters for languageList .. 
  }
  </code></pre>
  
  <p>But the page doesn't load with the autocompleter. Page shows simply a select box... Any solutions? Plz ... I refered a lot , but i couln't find the silution...</p>
  
  <p>I referred the site <a href="http://code.google.com/p/struts2-jquery/wiki/SelectTag#Receive_Entrys_from_a_simple_String_List" rel="nofollow">http://code.google.com/p/struts2-jquery/wiki/SelectTag#Receive_Entrys_from_a_simple_String_List</a> </p>
  
  <p>Thanks in advance...</p>