ModelAndView: материализованное представление [null] в контроллере AJAX

Это контроллер. Я получаю modelandview null

@Controller
@RequestMapping("VIEW")
public class PortletDemo {

@RequestMapping
public String getvalue(){
    return "hello";
}
@ResponseBody 
@ResourceMapping(value="showData")  
public Employee showData(PortletRequest request, PortletResponse response) 
throws PortletException, IOException {
    System.out.println("You are in controller method"); 
   //MappingJackson2JsonView view = new MappingJackson2JsonView();

    Employee employee = new Employee();
    String firstName = request.getParameter("firstName");
    String lastName = request.getParameter("lastName");
    String email = request.getParameter("email");

    employee.setEmail(email);
    employee.setFirstName(firstName);
    employee.setLastName(lastName);
    System.out.println("PortletDemo.showData()");
    System.out.println(employee);

    return employee;
}

} 

0 ответов

Другие вопросы по тегам