SEVERE: Servlet [Controller] in web application [/myfirst-mvc-project] threw load() exception
I have got the below error while running my First Spring Web MVC application using Tomcat Server.
The error log in the Console is:
INFO: Marking servlet [dad-frontController] as unavailable
Sep 30, 2021 10:34:12 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet [dad-frontController] in web application [/myfirst-mvc-project] threw load() exception
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
To solve this error from your project, Follow the steps below:
This issue occurred to me because I didn't provide path in Deployment option in properties of the project:
Right click on project ---> select "properties" --> Deployement assembly -->
"ADD" option --> select "java build path entries" --> select path(jar files of spring)
i think you will be able to solve your problem in Spring or any other projects.