Web开发中web.xml的基本配置及其标签功能

2020-12-17  本文已影响0人  吴阿汤

一 web.xml文件的简介:

1. web.xml文件是用来初始化配置信息:比如Welcome页面、servlet、servlet-mapping、filter、listener、启动加载级别等。

2. 当你的web工程没用到这些时,你可以不用web.xml文件来配置你的Application。

二 常用的一些标签元素及其功能:

1. 指定欢迎页面<welcome-file-list>,例如:

```

<welcome-file-list>     

<welcome-file>index.jsp</welcome-file>     <welcome-file>index1.jsp</welcome-file>

 </welcome-file-list>

```

上一篇 下一篇

猜你喜欢

热点阅读