Spring MVC <welcome-file-list> 问题
2016-11-07 18:49
351 查看
在web.xml上首先设置
然后给SpringMVC 增加一个/index 的映射
最后在controller层添加一个首页控制器得到index的请求
<welcome-file-list> <welcome-file>index</welcome-file> </welcome-file-list>
然后给SpringMVC 增加一个/index 的映射
<servlet-mapping> <servlet-name>springMVC</servlet-name> <url-pattern>/index</url-pattern> </servlet-mapping>
最后在controller层添加一个首页控制器得到index的请求
@RequestMapping("/index")
相关文章推荐
- web项目直接在浏览器上访问不需要带.jsp,直接ip地址加项目名 在web.xml里配置,<welcome-file-list><welcome-file> /view/login.jsp <
- maven 项目<welcome-file-list>使用
- spring mvc <mvc:annotation-driven>配置使用出现问题
- 对于<welcome-file-list>设置主页后无法引用CSS的问题
- spring中配置<mvc:default-servlet-handler />后必须配置<mvc:annotation-driven/>的问题
- spring mvc <mvc:annotation-driven>配置使用出现问题
- springMvc <form action="">提交跳转路径问题
- web.xml中<welcome-file-list>配置
- Tomcat设置<welcome-file>显示首页问题
- 关于Spring中找不到<mvc:resources/>标签的解决办法
- 关于web.xml中<welcome-file-list>
- 关于spring 3.0.5的 <mvc:resources mapping="***" location="***">标签的使用
- <welcome-file>index.action</welcome-file>直接设置action,404和struts2中的解决方案
- 关于spring 3.0.5的<mvc:resources> 标签的使用
- Qt4项目迁移Qt5项目一问题解决方法:#include <QtGui/QApplication> ---> No such file or directory
- Maven + Spring + SpringMVC + Spring JPA <2>
- Maven + Spring + SpringMVC + Spring JPA <1>
- springmvc <url-pattern>xxx</url-pattern>配置
- spring-mvc源码阅读(二)<mvc:annotation-driven/>做了什么
- SpringMVC—<mvc:annotation-driven/>标签