我正在使用spring 3.0.5.RELEASE开发一个应用程序 这是我的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" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
</beans>
这是我的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>
<display-name>Devices Manager</display-name>
<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>/sigfox/*</url-pattern>
</servlet-mapping>
</web-app>
这是我的控制者:
@Controller
@SessionAttributes("loggedUser")
public class DevicesController {
@RequestMapping(value = "/devices", method = RequestMethod.GET)
public String home(Locale locale, Model model) {
return "devices";
}
..
}
这是devices.jsp的位置:
和/webapp/WEB-INF/jsp/devices.jsp
内但是http://runnerp10.codenvycorp.com:56965/sigfox/devices没有重定向到devices.jsp,我看到了HTTP 404(?)