好像是路径问题,我改了一不管用,报404 十二月 30, 2013 10:16:49 上午 org.springframework.web.servlet.DispatcherServlet noHandlerFound WARNING: No mapping found for HTTP request with URI [/0miss1/hello.html] in DispatcherServlet with name 'spring'
我粘贴错了!HTTP Status 404 - /0miss1/hello.jsptype Status reportmessage /0miss1/hello.jspdescription The requested resource is not available. Apache Tomcat/6.0.37要看看我的配置吗
好像是路径问题,我改了一不管用,报404
十二月 30, 2013 10:16:49 上午 org.springframework.web.servlet.DispatcherServlet noHandlerFound
WARNING: No mapping found for HTTP request with URI [/0miss1/hello.html] in DispatcherServlet with name 'spring'
我粘贴错了!HTTP Status 404 - /0miss1/hello.jsptype Status reportmessage /0miss1/hello.jspdescription The requested resource is not available.
Apache Tomcat/6.0.37要看看我的配置吗
<head>
<title>Spring 3.0 MVC</title>
</head>
<body>
<a href="hello.jsp">SAY HELLO</a>
</body>
</html>
hello.jsp<html>
<head>
<title>Spring 3.0 MVC Series:Hello World</title>
</head>
<body>
${message}
</body>
</html>spring-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan
base-package="net.viralpatel.spring3.controller"/>
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp"/>
</bean>
</beans>
web.xml<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>0miss1</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
</web-app>