No Spring WebApplicationInitializer types detected on classpath

This turned out to be a stupid error. My log4j wasn't configured to capture my error output. I was throwing configuration errors in the background and once I fixed those I was good to go and my request mappings worked fine.


Watch out if you are using Maven. Your folder's structure must be right.

When using Maven, the WEB-INF directory must be inside webapp:

src/main/webapp/WEB-INF

I spent hours on this, and the solution was:

  • Stop Tomcat
  • "Project" menu -> Clean -> Clean all projects
  • Servers tab -> Tomcat -> Right click -> Clean...
  • Right click on project -> Run as -> Run on server