MultiActionController no longer receiving requests?
Posted
by Stefan Kendall
on Stack Overflow
See other posts from Stack Overflow
or by Stefan Kendall
Published on 2010-03-16T15:51:34Z
Indexed on
2010/03/16
16:11 UTC
Read the original article
Hit count: 344
I was attempting to make changes to my controller, and all of a sudden, I no longer seem to receive any requests (404 when attempting to hit the servlet mapped URLs). I'm sure I've broken my web.xml
or app-servlet.xml
, but I just don't see where. I can access index.jsp
from tomcat (http://IP/app/index.jsp
), but I can't get my servlet mapping to work correctly.
Help?
web.xml:
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app version = "2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>app</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servet-mapping>
<servlet-name>app</servlet-name>
<url-pattern>/myRequest</url-pattern>
</servet-mapping>
app-servlet.xml:
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app version = "2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>app</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servet-mapping>
<servlet-name>app</servlet-name>
<url-pattern>/myRequest</url-pattern>
</servet-mapping>
</web-app>
© Stack Overflow or respective owner