While starting tomcat server I am getting an exception
SEVERE: Servlet /MavenWeb threw load() exception
java.lang.ClassCastException: org.springframework.we
In my case it wasn't a problem with the libraries. I was changing a Standard Servlet to be implemented with Spring, so I followed these instructions, that I paraphrase here just in case the page goes down later:
Implement org.springframework.web.HttpRequestHandler instead of extending javax.Servlet
public class MyServlet implements HttpRequestHandler {
Created the bean in the applicationContext.xml (I did it in the dispatcher-servlet.xml)
Specify the servlet in the Web.xml, changing the old class (com.package.to.MyServlet) to Spring HttpRequestHandlerServlet.
I had to do an additional step to avoid a FileNotFoundException about applicationContext.xml doing the following in the web.xml