web.xml配置详解
来源:互联网 发布:aes算法演示 编辑:程序博客网 时间:2024/05/21 06:01
web.xml配置详解,学J2EE,大部分是走向,做Web项目+大数据。
而每一个Web项目,必须有一个web.xml文件。
而分析Web项目,必经之路的起点在web.xml文件。
web.xml学名叫部署描述符文件,是在Servlet规范中定义的,是web应用的配置文件。
注意:①大小写敏感。②元素的次序敏感。③所有元素在<web-app>...</web-app>中。
web.xml示例:来自struts-2.3.20.1\src\apps\blank\src\main\webapp\WEB-INF
<?xml version="1.0" encoding="UTF-8"?><web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name>Struts Blank</display-name> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> <!-- Restricts access to pure JSP files - access available only via Struts action --> <security-constraint> <display-name>No direct JSP access</display-name> <web-resource-collection> <web-resource-name>No-JSP</web-resource-name> <url-pattern>*.jsp</url-pattern> </web-resource-collection> <auth-constraint> <role-name>no-users</role-name> </auth-constraint> </security-constraint> <security-role> <description>Don't assign users to this role</description> <role-name>no-users</role-name> </security-role></web-app>
元素顺序列表
各元素标签详解:
<icon>
0 0
- Web.XML 配置详解
- Web.XML 配置详解
- web.xml配置详解
- web.xml配置详解
- web.xml配置详解
- Web.XML 配置详解
- Web.XML 配置详解
- Web.xml配置详解
- web.xml配置详解
- web.xml 配置详解
- web.xml配置详解
- Web.xml 配置详解
- Web.xml配置详解
- web.xml配置详解
- web.xml配置详解
- Web.XML 配置详解
- web.xml配置详解
- web.xml配置详解
- Date/Time 函数
- 字符串函数
- win 10 + maven + idea 15 + Hadoop 2.7.3开发环境配置
- [bsoj3134] 好感统计
- 数组函数
- web.xml配置详解
- EmguCV图像显示控制台程序
- qq一键登录
- Unity3D 弓箭的拋物線轨道(弹道)
- 蓝桥杯 算法训练 Lift and Throw
- 函数积累
- MySQL 按照日期格式查询带有时间戳数据
- 关于图片或者文件在数据库的存储方式归纳
- Kinect空洞填充算法