in spring framework how to get response from controller to jsp page by ajax call passing an id value to controller
<p>In my program i need to perform an operation by passing id.The id is     selected from a dropdown box(ie;changing dynamically).so to pass the id i'am using ajax.but i don't know the code to receive the response back from  controller in spring.</p>

<pre><code>&lt;div class="form-group"&gt;
   &lt;label  class="col-sm-4 control-label"&gt;Employee&lt;/label&gt;
   &lt;div class="col-sm-6"&gt;
     &lt;select id="empId" name="empId" class="form-control" &gt;
        &lt;option value="" &gt;--Select--&lt;/option&gt;
        &lt;c:forEach var="row" items="${employeeList}" &gt;
          &lt;option value="${employeeList.Id}"&gt;${employeeList.name&lt;/option&gt;
        &lt;/c:forEach&gt; 
     &lt;/select&gt;
   &lt;/div&gt;
   &lt;div class="col-sm-6"&gt;
     &lt;input type="text" name="empname" id="empname" class="form-control"/&gt;
   &lt;/div&gt;
 &lt;/div&gt;


//i need to pass the employee id from the dropdown box to controller and get     //the name of the employee as response .and set the response value in the text     //box.how can be it done in spring using ajax.
</code></pre>

<p>//ajax code i tried</p>

<pre><code>  $('#empId').change(function(event) {  
                var eId= $("select#empId").val();
                $.get('getEmpName', {
                    id: eId
                }, function(data) {
                    $('#empname').val(data);
                });
            });
//but i am not getting any response ie:nothing in data
</code></pre>