web.xml中的welcome-file-list不起作用
来源:互联网 发布:安装用友数据库不符合 编辑:程序博客网 时间:2024/05/17 22:49
今天尝试使用struts2+urlrewrite+sitemesh部署项目,结果发现welcome-file-list中定义的欢迎页不起作用:
这样就达到了只输入项目名就可访问的目的:直接输入http://localhost:8080/project
<welcome-file-list><welcome-file>/index.jsp</welcome-file></welcome-file-list>
启动服务器后,直接输入http://localhost:8080/project 终是报404错误,初步猜测是由于没有找到index.jsp这个文件造成的,于是在web-root下新建一个空白的index.jsp;重新启动之后成功显示,但是由于welcome-file中不能直接写action,所以对index.jsp进行改造:
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><jsp:forward page="/index.html" />
这样就达到了只输入项目名就可访问的目的:直接输入http://localhost:8080/project
- web.xml中的welcome-file-list不起作用
- web.xml中的welcome-file-list
- welcome-file-list不起作用
- welcome-file-list不起作用
- 关于web.xml中的welcome-file-list(欢迎页)
- 关于web.xml中的welcome-file-list(欢迎页)
- 关于web.xml中的welcome-file-list(欢迎页)
- web.xml中的welcome-file-list(欢迎页)
- 关于web.xml中<welcome-file-list>
- 关于web.xml中<welcome-file-list>
- web.xml中<welcome-file-list>配置
- 关于web.xml中的<welcome-file-list>中的默认首页文件
- 关于web.xml中的<welcome-file-list>中的默认首页文件
- 为何web.xml中的welcome-file-list不能是Action地址
- web.xml之welcome-file-list、error-page
- web.xml(7)_mime-mapping、welcome-file-list、error-page
- web.xml里面的welcome-file-list是什么意思
- java web.xml welcome-file-list的默认值
- Java基础——面向对象
- 数据流图实例1
- C++实现的binder通讯小程序
- android开发 NDK 编译和使用静态库、动态库
- Java基础——对象序列化
- web.xml中的welcome-file-list不起作用
- C#中几种换行符
- SVN学习之服务器和Tortoise客户端搭建
- Session的clear方法和flush方法
- PHP5.3开发-解决DEPRECATED错误问题
- 解决 NDK 编译静态库时没反应
- poj 1321 棋盘问题
- java基础——面向对象设计方法
- 【*动漫江南stylewin7主题*】