web.xml中<welcome-file-list>配置
2017-07-18 09:53
465 查看
web.xml中<welcome-file-list>配置((web欢迎页、首页))
在web项目中,当用户在浏览器中输入的URL不包含某个特定的Servlet、html、jsp页面时,web.xml中<welcome-file-list>标签元素就会指定显示的默认文件。
案例:
项目结构如下:
情况1:
web.xml中<welcome-file-list>标签元素指定显示的默认文件如下:当浏览器输入的URL为:http://127.0.0.1:8080/hotel/ 即可显示http://127.0.0.1:8080/hotel/sys/index.jsp 中的内容
情况2:
web.xml中<welcome-file-list>标签元素指定显示的默认文件如下:当浏览器输入的URL为:http://127.0.0.1:8080/hotel/sys/ 即可显示http://127.0.0.1:8080/hotel/sys/index.jsp 中的内容
相关文章推荐
- web项目直接在浏览器上访问不需要带.jsp,直接ip地址加项目名 在web.xml里配置,<welcome-file-list><welcome-file> /view/login.jsp <
- 关于web.xml中的<welcome-file-list>
- 关于web.xml中<welcome-file-list>
- 关于web.xml中的<welcome-file-list>中的默认首页文件
- Tomcat8.x 在上下文的web.xml配置跳转到jsp文件<jsp-file>
- 关于web.xml中的<welcome-file-list>中的默认首页文件
- 关于web.xml中的<welcome-file-list>中的默认首页文件
- 关于web.xml中的<welcome-file-list>中的默认首页文件
- 关于web.xml中的<welcome-file-list>中的默认首页资料
- 在 web.xml中配置<mime-mapping>实现浏览器根据文件类型自动打开
- 一个web项目web.xml的配置中<context-param>配置作用
- 一个web项目web.xml的配置中<context-param>配置作用
- Servlet 在 web.xml 中设置<init-param>配置信息遇到的问题
- 在web.xml中无法配置<taglib>的问题
- web.xml配置文件中<async-supported>true</async-supported>报错的解决方案
- 一个web项目web.xml的配置中<context-param>配置作用
- web.xml文件中配置<mime-mapping>下载文件类型
- Spring配置web.xml中<listener>标签(ContextLoaderListener类解析)解析
- web.xml配置文件中<async-supported>true</async-supported>报错的解决方案
- <welcome-file-list>action配置