关于web.xml内,设置默认页面的问题

来源:百度知道 编辑:UC知道 时间:2024/05/01 05:00:49
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
这句是什么意思 为什么要有那么多welcome-file 那么多weilome是什么作用
我的意思是默认访问页面的话一个就够了啊,干嘛要这么多

看错意思了,
应该这些首页的可能情况都列出来。如果存在会访问存在的页面。应该是这样。谢谢。

这是最基本的XML语法。

welcome-file 是标识。当然你可以换成你想要的,你可以试一下啊。可以用你所要想用的标识。明白吗?不明白可以给我留言,我详细给你讲。

在W3C网站上有 也有介绍这方面知识的网站 你可以看下

参考资料:http://www.w3school.com.cn/xml/index.asp
很高兴为您回答。

意思就是没有指定进入的页面,他就默认访问这些页面

-------补充---------
你也可以只设置一个啊!把其他的没有的页面的配置都删掉,这样程序也可以运行,这个文件只是一开始就给你写这么多而已,不用管的