Category Archives: ViewResolver

javax.servlet.ServletException: Circular view path

Problem :

javax.servlet.ServletException: Circular view path [error]: would dispatch back to the current handler URL [/latestOrder] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)

Solution :

You’ve annotated the controller method as producing JSON or String or any other object . You probably want to annotate the method with @ResponseBody and change its return type to allow you to return an object representation of the JSON that you want to include in the response

  @RequestMapping(value="latestOrders",method = RequestMethod.GET)
public @ResponseBody List<Order> listProducts(Model model) throws JMSException{
List<Order> list=new ArrayList();
return list;

102 total views, no views today