I am trying to configure my latest Spring application programmatically instead of with an xml file. However, I am running into a problem where when I import the spring-webmvc-4.0.3.RELEASE jar the compiler no longer uses the Servlet 3 api.
I need to have access to methods like: ServletContext.addListener(java.lang.Class listenerClass)
and
ServletContext.addServlet(java.lang.String servletName, java.lang.Class servletClass)
But I also need to be able to use spring mvc classes like DispatcherServlet .
Is this a known bug with Spring 4 and does anyone know of any resolution for it?