comment faire pour renvoyer l'objet à partir du contrôleur de l'ajax dans spring mvc

J'ai du renvoyer la liste des employés de Contrôleur de l'ajax de jQuery. Comment dois-je faire pour elle?

//controller part 
@RequestMapping("phcheck")
public ModelAndView pay(@RequestParam("empid") int empid, String fdate, String tdate) {

   ModelAndView mav = new ModelAndView("phcheck");
   List<Employee> emp=entityManager.createQuery("select e from Employee e where e.empId="+empid, Employee.class).getResultList();
   mav.addObject("emp", emp); <----I need this list of employee in ajax
   return mav;
}

Ajax en Vue

//Ajax part
$(document).ready(function () {
$("#empid").change(function () {
    if ($("#fdate").val() != "" && $("#tdate").val() != "" && $("#empid").val() != "") {
        jQuery.ajax({
            url: "phcheck.htm?empid=" + $("#empid").val() + "&&fdate=" + $("#fdate").val() + "&&tdate=" + $("#tdate").val(),
            success: function (data) {
                alert(data + "success");
            },
            error: function (data) {
                alert(data + "error");
            }
        });
    } else {
        alert("Please fill the from date and to date or select the employee id");
        $("#empid .option").attr("selected", "selected")
    }
});

});

Merci d'avance.

OriginalL'auteur Gorakh | 2014-04-24