一个简单的web文件配置参考
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<error-page>
<error-code>404</error-code>
<location>/404error.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/500error.jsp</location>
</error-page>
<filter>
<filter-name>CharacterFilter</filter-name>
<filter-class>team1.videoplay.filter.CharacterFiler</filter-class>
</filter>
<filter>
<filter-name>CommonFilter</filter-name>
<filter-class>team1.videoplay.filter.CommonFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CharacterFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>CommonFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<servlet>
<servlet-name>registeServlet</servlet-name>
<servlet-class>team1.videoplay.user.servlet.registServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>showUserDetailServlet</servlet-name>
<servlet-class>team1.videoplay.user.servlet.showUserDetailServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>addReviewServlet</servlet-name>
<servlet-class>team1.videoplay.review.servlet.addReviewServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>CheckUserName</servlet-name>
<servlet-class>team1.videoplay.user.servlet.CheckUserName</servlet-class>
</servlet>
<servlet>
<servlet-name>GetAllMemberServlet</servlet-name>
<servlet-class>team1.videoplay.user.servlet.GetAllMemberServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>UserStatusModifyServlet</servlet-name>
<servlet-class>team1.videoplay.user.servlet.UserStatusModifyServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>UserDeleteServlet</servlet-name>
<servlet-class>team1.videoplay.user.servlet.UserDeleteServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>GetAllPayUser</servlet-name>
<servlet-class>team1.videoplay.payuser.servlet.GetAllPayUser</servlet-class>
</servlet>
<servlet>
<servlet-name>PayUserDetail</servlet-name>
<servlet-class>team1.videoplay.payuser.servlet.PayUserDetail</servlet-class>
</servlet>
<servlet>
<servlet-name>PayUserResult</servlet-name>
<servlet-class>team1.videoplay.payuser.servlet.PayUserResult</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>registeServlet</servlet-name>
<url-pattern>/registServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>showUserDetailServlet</servlet-name>
<url-pattern>/showUserDetailServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>addReviewServlet</servlet-name>
<url-pattern>/addReviewServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CheckUserName</servlet-name>
<url-pattern>/checkUserName.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>GetAllMemberServlet</servlet-name>
<url-pattern>/getAllMemberServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UserStatusModifyServlet</servlet-name>
<url-pattern>/userStatusModifyServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UserDeleteServlet</servlet-name>
<url-pattern>/userDeleteServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>GetAllPayUser</servlet-name>
<url-pattern>/getAllPayUser.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>PayUserDetail</servlet-name>
<url-pattern>/payUserDetail.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>PayUserResult</servlet-name>
<url-pattern>/payUserResult.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- -liangliang -->
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>getAllPayUserServlet</servlet-name>
<servlet-class>team1.videoplay.payuser.servlet.GetAllPayUserServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>GetAllTypeServlet</servlet-name>
<servlet-class>team1.videoplay.category.servlet.GetAllTypeServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>DeleteTypeServlet</servlet-name>
<servlet-class>team1.videoplay.category.servlet.DeleteTypeServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>UpdateTypeAgoServlet</servlet-name>
<servlet-class>team1.videoplay.category.servlet.UpdateTypeAgoServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>AddTypeServlet</servlet-name>
<servlet-class>team1.videoplay.category.servlet.AddTypeServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>UpdateTypeServlet</servlet-name>
<servlet-class>team1.videoplay.category.servlet.UpdateTypeServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>SearchTypeServlet</servlet-name>
<servlet-class>team1.videoplay.category.servlet.SearchTypeServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>GetAllVideoServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.GetAllVideoServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>SearchVideoServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.SearchVideoServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>GetAllCheckVideoServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.GetAllCheckVideoServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>SearchCheckVideoServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.SearchCheckVideoServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>CheckVideoAgoServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.CheckVideoAgoServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>AuditingVideoServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.AuditingVideoServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>videoUploadServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.videoUploadServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>VideoListServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.VideoListServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>UserPayServlet</servlet-name>
<servlet-class>team1.videoplay.userPay.servlet.UserPayServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>LoginServlet</servlet-name>
<servlet-class>team1.videoplay.user.servlet.LoginServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>ApplyMoneyServlet</servlet-name>
<servlet-class>team1.videoplay.payuser.servlet.ApplyMoneyServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>BuyScoreServlet</servlet-name>
<servlet-class>team1.videoplay.user.servlet.BuyScoreServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>UserModifyServlet</servlet-name>
<servlet-class>team1.videoplay.user.servlet.UserModifyServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>ExitSystem</servlet-name>
<servlet-class>team1.videoplay.user.servlet.ExitSystem</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>GetPasswordServlet</servlet-name>
<servlet-class>team1.videoplay.user.servlet.GetPasswordServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>TypeQuery</servlet-name>
<servlet-class>team1.videoplay.video.servlet.TypeQuery</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>VideoPlayServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.VideoPlayServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>VideoDetailServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.VideoDetailServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>PayUserServlet</servlet-name>
<servlet-class>team1.videoplay.payuser.servlet.PayUserServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>MyVideoManageServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.MyVideoManageServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>VideoModifyServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.VideoModifyServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>VideoUpdateServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.VideoUpdateServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>VideoDeleteServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.VideoDeleteServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>DoScoreServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.DoScoreServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>PayServlet</servlet-name>
<servlet-class>team1.videoplay.userPay.servlet.PayServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>UserBuyScoreServlet</servlet-name>
<servlet-class>team1.videoplay.userPay.servlet.UserBuyScoreServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>Login</servlet-name>
<servlet-class>team1.videoplay.user.servlet.Login</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>LoginGoServlet</servlet-name>
<servlet-class>team1.videoplay.user.servlet.LoginGoServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>SearchServlet</servlet-name>
<servlet-class>team1.videoplay.video.servlet.SearchServlet</servlet-class>
</servlet>
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>MyWalletServlet</servlet-name>
<servlet-class>team1.videoplay.user.servlet.MyWalletServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>getAllPayUserServlet</servlet-name>
<url-pattern>/getAllPayUserServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>GetAllTypeServlet</servlet-name>
<url-pattern>/getAllTypeServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DeleteTypeServlet</servlet-name>
<url-pattern>/deleteTypeServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UpdateTypeAgoServlet</servlet-name>
<url-pattern>/updateTypeAgoServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AddTypeServlet</servlet-name>
<url-pattern>/addTypeServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UpdateTypeServlet</servlet-name>
<url-pattern>/updateTypeServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SearchTypeServlet</servlet-name>
<url-pattern>/searchTypeServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>GetAllVideoServlet</servlet-name>
<url-pattern>/getAllVideoServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SearchVideoServlet</servlet-name>
<url-pattern>/searchVideoServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>GetAllCheckVideoServlet</servlet-name>
<url-pattern>/getAllCheckVideoServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SearchCheckVideoServlet</servlet-name>
<url-pattern>/searchCheckVideoServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CheckVideoAgoServlet</servlet-name>
<url-pattern>/checkVideoAgoServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AuditingVideoServlet</servlet-name>
<url-pattern>/auditingVideoServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>videoUploadServlet</servlet-name>
<url-pattern>/videoUploadServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>VideoListServlet</servlet-name>
<url-pattern>/videoListServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UserPayServlet</servlet-name>
<url-pattern>/userPayServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LoginServlet</servlet-name>
<url-pattern>/loginServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ApplyMoneyServlet</servlet-name>
<url-pattern>/applyMoneyServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>BuyScoreServlet</servlet-name>
<url-pattern>/buyScoreServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UserModifyServlet</servlet-name>
<url-pattern>/userModifyServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ExitSystem</servlet-name>
<url-pattern>/exitSystem.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>GetPasswordServlet</servlet-name>
<url-pattern>/getPasswordServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>TypeQuery</servlet-name>
<url-pattern>/typeQuery.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>VideoPlayServlet</servlet-name>
<url-pattern>/videoPlayServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>VideoDetailServlet</servlet-name>
<url-pattern>/videoDetailServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>PayUserServlet</servlet-name>
<url-pattern>/payUserServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>MyVideoManageServlet</servlet-name>
<url-pattern>/myVideoManageServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>VideoModifyServlet</servlet-name>
<url-pattern>/videoModifyServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>VideoUpdateServlet</servlet-name>
<url-pattern>/videoUpdateServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>VideoDeleteServlet</servlet-name>
<url-pattern>/videoDeleteServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>DoScoreServlet</servlet-name>
<url-pattern>/doScoreServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>PayServlet</servlet-name>
<url-pattern>/payServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UserBuyScoreServlet</servlet-name>
<url-pattern>/userBuyScoreServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Login</servlet-name>
<url-pattern>/login.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LoginGoServlet</servlet-name>
<url-pattern>/loginGo.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SearchServlet</servlet-name>
<url-pattern>/searchServlet.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>MyWalletServlet</servlet-name>
<url-pattern>/myWalletServlet.do</url-pattern>
</servlet-mapping>
</web-app>
发表评论
-
js判断一个图片是否已经存在于缓存
2013-05-31 15:15 7241【解决】js判断一个图片是否已经存在于缓存(兼容IE各版本及 ... -
ICE实例
2013-01-25 17:46 879本文将结合实际项目,做一个基于ice的实际项目实例应用,该实例 ... -
ICE转摘学习
2013-01-25 17:44 796Ice 出自ZeroC名门之 ... -
Google 浏览器css hack 写法
2013-01-16 11:09 749针对Chrome和Safari等Webkit核心浏览器的CS ... -
图片预加载做法
2012-12-18 17:34 798/** * 图片头数据加载就 ... -
ant 常用命令
2012-11-12 22:03 1361C:\>ant -help\-h 获取ant的帮助信息( ... -
java getResource()和getResourceAsStream以及路径问题(转)
2012-06-12 23:54 854用JAVA获取文件,听似简单,但对于很多像我这样的新人来说,还 ... -
MYSQL常用命令
2012-05-27 18:10 741MYSQL常用命令 1.导出整个数据库 mysqldump ... -
hibernate 使用二级缓存 配置
2012-05-26 23:57 1006配置二级缓存主要有两个步骤。 选择需要使用第三方二级缓存 ... -
spring新的jar包名称,搭建框架列表
2012-04-28 13:12 901For a typical web application y ... -
图片垂直对齐的方法
2012-04-28 11:39 813<!DOCTYPE html PUBLIC " ... -
浅谈Java中的几种随机数
2012-04-20 23:51 528众所周知,随机数是任何一种编程语言最基本的特征之一。而生成随机 ...
相关推荐
《web.xml文件配置详解》 web.xml文件是Java Web应用程序的部署描述符,它是容器(如Tomcat)理解和管理Web应用的关键配置文件。本文将深入探讨web.xml文件中的加载顺序和常用元素,帮助开发者更好地理解和使用。 ...
ssm框架web.xml文件配置
为了提高代码的可维护性和复用性,有时需要将一部分配置内容提取到独立的XML文件中,再在`web.xml`中引用这些文件。本文将详细介绍如何在`web.xml`中引入其他XML配置文件,并解决可能出现的问题。 #### 步骤一:...
#### 二、web.xml文件结构 `web.xml`文件的最外层标签为`<web-app>`,所有的配置项都需要定义在这个标签内,并且遵循一定的顺序。以下是对`web.xml`主要配置项的详细介绍: #### 三、配置项详解 1. ****:该标签...
Web.xml 配置详解 Web.xml 是一个部署描述符文件,用于...web.xml 文件是 Web 应用程序的配置文件,用于描述 Web 应用程序的各种配置信息。了解 web.xml 文件的结构和元素次序对于开发和配置 Web 应用程序非常重要。
web.xml 配置详解是指在 Java Web 应用程序中使用的部署描述符配置文件。它是一个 XML 文件,包含了很多描述 servlet/JSP 应用的各个方面的元素,如 servlet 注册、servlet 映射以及监听器注册。 在 web.xml 文件中...
- 在web.xml中,我们可以使用`<context-param>`标签来指定Log4j配置文件的位置,例如: ```xml <param-name>log4jConfigLocation <param-value>/WEB-INF/classes/log4j.properties ``` - 接着,使用`...
在大型Web工程中,web.xml文件非常重要,因为它提供了一个中央配置点,便于管理Web应用的各种资源和服务。 ### Servlet版本与web.xml的结构 不同版本的servlet规范定义了不同的web.xml结构。以Servlet 2.3和...
在Tomcat的`conf`目录下,有两个主要的XML配置文件:`server.xml`和`web.xml`。`server.xml`是Tomcat的主要配置文件,而`web.xml`则定义了应用程序的行为。 在`server.xml`中,我们需要配置`<Connector>`元素来启用...
3. **修改web.xml文件** - 在`web.xml`中找到`<welcome-file-list>`标签,并在其中添加刚创建的`go.action`文件名。 ```xml <welcome-file>go.action ``` - 这样做可以让服务器在访问项目根目录时自动...
在构建基于Spring MVC的Web应用程序时,`web.xml`配置文件扮演着至关重要的角色。它定义了应用程序的行为,包括启动时的初始化、请求处理以及中间件的设置。下面我们将详细探讨`web.xml`中涉及Spring MVC的主要配置...
"J2EE 中关于 web.xml 文件的配置" 在 J2EE 中,web.xml 文件扮演着非常重要的角色,它是一个基于 XML 的配置文件,用于描述 Web 应用的各个方面的配置信息。通过 web.xml 文件,我们可以对 Web 应用进行配置,例如...
* fileName文件的路徑和名稱 * firstChild為xml第一個節點 * */ public Element ReaderXml(String fileName,String firstChild){ Element element=null; try{ File xmlFile = new File(fileName); ...
本示例文件"演示web.xml文件中error-page标签的使用.zip"包含了一个简单的演示,以帮助理解这个功能。 `<error-page>`标签允许开发者指定当特定的错误发生时显示哪个页面。这可以极大地提升用户体验,因为默认的...
Tomcat 中 web.xml 文件是 Web 应用的核心配置文件,负责管理 Web 应用的生命周期、Servlet 的加载顺序、Filter 的配置等。下面对 web.xml 文件中的重要元素进行详细解释。 context-param 元素 context-param 元素...
【web.xml】是Java Web应用程序的核心配置文件,用于定义应用的结构、行为和运行时环境。它是基于XML的,遵循特定的语法规则和元素顺序。以下是对web.xml配置文件中各个元素的详细说明: 1. **定义头和根元素** - ...
综上所述,web.xml文件配置了Web应用在运行时的各种行为,是Web应用和Web容器之间交互的桥梁。web.xml文件的正确配置对于Web应用的正确部署和运行至关重要。web.xml的配置顺序也遵循一定的规则,比如ServletContext...