首页新闻找找看学习计划

http://localhost:8080后出现//

0
悬赏园豆:50 [待解决问题]
 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" 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">
 3   <display-name>02-returnVoid-ajax</display-name>
 4   <filter>
 5     <filter-name>CharacterEncodingFilter</filter-name>
 6     <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
 7     <init-param>
 8       <param-name>encoding</param-name>
 9       <param-value>utf-8</param-value>
10     </init-param>
11     <init-param>
12       <param-name>forceEncoding</param-name>
13       <param-value>true</param-value>
14     </init-param>
15   </filter>
16   <filter-mapping>
17   <filter-name>CharacterEncodingFilter</filter-name>
18   <url-pattern>/*</url-pattern>
19   </filter-mapping>
20   <servlet>
21     <servlet-name>springMVC</servlet-name>
22     <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
23     <init-param>
24       <param-name>contextConfigLocation</param-name>
25       <param-value>classpath:springMVC.xml</param-value>
26     </init-param>
27     <load-on-startup>1</load-on-startup>
28   </servlet>
29   <servlet-mapping>
30     <servlet-name>springMVC</servlet-name>
31     <url-pattern>*.do</url-pattern>
32   </servlet-mapping>
33   <welcome-file-list>
34     <welcome-file>index.jsp</welcome-file>
35   </welcome-file-list>
36 </web-app>
web.xml

运行后老出现下图的路径错误

hoje的主页 hoje | 初学一级 | 园豆:154
提问于:2018-03-18 23:47
< >
分享
所有回答(2)
0

你部署的根路径是 /02-return...这个,启动后自然进入的是你的根设置

2012 | 园豆:18890 (专家六级) | 2018-03-19 08:09
0

试试把这个'/'去掉

庸斋杂记 | 园豆:575 (小虾三级) | 2018-03-19 10:10
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册