Skip to content
Advertisement

Eclipse & Tomcat Error: HTTP Status 404 – Not Found: [closed]

Description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

This is my HomeController Class:

JavaScript

This is my Web.xml File:

JavaScript

This is spring-mvc-demo-servlet file

JavaScript

This is main-menu.jsp file

JavaScript

Here is the Image of Directory

Directory Image in Eclipse

PS: I have tried all other option including switching the location, cleaning the directory and reinstalling tomcat and eclipse but all these are not working for me.Even, I changed the IDE from Eclipse to IntelliJ Idea but problem persists.

Advertisement

Answer

Since your servlet name is ‘dispatcher’ Spring looks for the file dispatcher-servlet.xml in the default location of your WEB-INF folder. Try renaming spring-mvc-demo-servlet.xml to dispatcher-servlet.xml and it will work.Hope it helps, Thanks

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement