I have an AJAX request that is posting to the URL http://localhost:8080/spellchecker/google-spellchecker.do which is mapped below. Any idea why this is throwing a 404 error? I have a System.out.println("=========="); in GoogleSpellChekerServlet.service() and it doesn’t get called.
<!-- Setup Spring ServletWrappers -->
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/spellchecker/google-spellchecker.do">googleSpellChekerWrappingController</prop>
</props>
</property>
</bean>
<bean id="googleSpellChekerWrappingController" class="org.springframework.web.servlet.mvc.ServletWrappingController">
<property name="servletClass">
<value>org.tinymce.spellchecker.GoogleSpellChekerServlet</value>
</property>
</bean>
Here’s a screenshot of the ajax request…

web.xml
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>*.html</url-pattern>
<url-pattern>*.json</url-pattern>
</servlet-mapping>
Your web.xml isn’t mapping *.do to the servlet.