web.xml里面的welcome-file-list是什么意思
来源:互联网 发布:进入数据库的命令 编辑:程序博客网 时间:2024/05/21 15:18
为了解决在eclipse打开工程里面随意一个网页都能正常显示时,写过的页面都要加进web.xml的welcome-file-list里面,例如
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>buy31-35.html</welcome-file>
<welcome-file>favorite.html</welcome-file>
<welcome-file>MyFavorite.html</welcome-file>
<welcome-file>payFail.html</welcome-file>
<welcome-file>PayIt.htm</welcome-file>
<welcome-file>paysucess.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
表示里面含有index.jsp、buy31-35.html等页面,运行工程时默认显示顺序第一的页面,在这里面也就是index.jsp页面。
如果:
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
里面没有把buy31-35.html加进去,即使工程里面含有这个页面,运行此页面时也是不能打开的,打开的只能是默认的index.jsp页面。
另外 index.jsp我们一般都是删掉,重新新建自己的html或者是jsp等页面,这里index.jsp其实有一个作用,index.jsp页面是和WebRoot同级的,我们新建页面时一般习惯也和WebRoot同级,其实这样不安全,这样容易被人家发现源代码,为了保护源代码,可以把自己写的页面放进Web-INF下,意思页面的信息,是不允许别人看到的。这样在index.jsp里的body还要加一个设置<jsp:forward page="buy31-35.html"></jsp:forward>意思是index.jsp跳转到自己写的buy31-35.html页面。
- web.xml里面的welcome-file-list是什么意思
- java web.xml welcome-file-list的默认值
- Jetty下web.xml的welcome-file-list无效
- java 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、error-page
- web.xml(7)_mime-mapping、welcome-file-list、error-page
- 关于web.xml中的welcome-file-list(欢迎页)
- 关于web.xml中的welcome-file-list(欢迎页)
- 关于web.xml中的welcome-file-list(欢迎页)
- web.xml中的welcome-file-list(欢迎页)
- web.xml 文件中welcome-file的元素
- web.xml中welcome-file配置的问题
- web.xml 中 welcome-file 为action的解决
- ANDROID内存优化(大汇总——全)
- 1091. Acute Stroke
- 自学笔记之快速排序
- [挑战程序设计竞赛] POJ 3050 - Hopscotch
- 用四个DIV做四个块成一个田字格布局
- web.xml里面的welcome-file-list是什么意思
- 并查集 HDOJ1856 More is better
- NYoj 79 导弹拦截(dp)
- 多态
- Extjs GridPanel 常用属性总结
- 常用在线java API集合
- 【算法与实现】动态规划(基本思想)
- rpm、yum的详细介绍
- 智能无屏电视介绍