就是制定首页
比如你写的项目 地址是 127.0.0.1
里边有一个也页面 index.jsp
如果要访问这个页面的话你要输入 127.0.0.1/index.jsp
如果在 <welcome-file-list>里指定了index.jsp为首页的话
你只要输入 127.0.0.1 就能直接打开 index.jsp



如果网站服务器上目录格式如下:./代表根目录
./Login.jsp
./User/Index.jsp
./Admin/Index.jsp
./Commodity/Manage.jsp
如果你想登陆系统就显示登陆窗口。
进入子目录就跳转到相应的Index或Manage页面<w-f-l>标签就如下配置:
<welcome-file-list>
  <welcome-file>Login.jsp</welcome-file>
  <welcome-file>User/Index.jsp</welcome-file>
  <welcome-file>Manage.jsp</welcome-file>
</welcome-file-list>



指定应用的首页
里面可以指定多个文件,应用服务器会按从上到下的顺序搜索,如果找到就了进入该页面,如果都遍历完了还没找到就会返回404错误代码给浏览器
posted on 2017-08-23 17:20  cyy_13  阅读(472)  评论(0编辑  收藏  举报