There was a question about Spring . There is a controller class, which, according to the specified url, should give jsp. Here is the code

 @ResponseBody public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) { return new ModelAndView("index1.jsp"); } 

However, an error occurs

timestamp = Wed May 04 10:00:14 MSK 2016, status = 500, error = Internal Server Error, exception = javax.servlet.ServletException, message = Circular view path [index1.jsp]: [/exercise/index1.jsp] again. Check your ViewResolver setup!

Understood that most likely you need to prescribe the property suffix=".jsp" , but there is nothing to change. Can you tell me "where is the dog buried"? If you register without the jsp extension, it does not work either. Thanks in advance

  • In fact, the error says that your jsp is obsessed, index.jsp transfers control to /exercise/index1.jsp, and that in turn back to index1, jsp. - Sergey
  • @ResponseBody is superfluous here if you are returning a view, and not the response body. Plus it would be nice to bring the full code of the class and settings for jsp - Temka is also

0