Sunday, August 20, 2017

HTTP Status 404 - description The requested resource is not available in Spring MVC application

Those novice java developers who had been working in spring MVC, sometimes might have faced this error while running the application. The above error usually occurs in spring mvc application. It shows name of a jsp page as not available which is associated with the application. This error is bit more confusing as the jsp page itself is there in the application.  Since the page is available you are not sure why this exception is coming. It means there is something wrong in the controller class.  You need to revisit your controller class again. Please check if you have defined the method in the RequestMapping of your controller class as shown below.
 @RequestMapping(value="/submitAdmissionForm.html",method=RequestMethod.GET)

If you think that you have created the method and still facing the issue, then check spelling of your method names being called from the form or the servlet.xml. There might have been some spelling mistake that’s why you are getting the issue. A simple spelling mistake can take hours to debug and resolve this kind of issue if you are new to spring MVC development.

No comments:

Post a Comment