web.xml配置详情 - 简要介绍
<!--web.xml 元素简介-->
<?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">
<display-name>Sample Application</display-name>
<!-- 文件清单 -->
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
<description>
This is a Page !
</description>
<!--过滤器--->
<filter>
<filter-name>SampleFilter</filter-name>
<filter-class>mypack.SampleFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>SampleFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<!-- servlet 配置:<servlet-mapping> 为映射 -->
<servlet>
<servlet-name>SampleServlet</servlet-name>
<servlet-class>com.example.AddServlet.AddEmpServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SampleServlet</servlet-name>
<url-pattern>/add</url-pattern>
</servlet-mapping>
<!-- 错误页引用 -->
<error-page>
<error-code>500</error-code>
<location>/error.htm</location>
</error-page>
<!-- session 保存的秒数:300 s -->
<session-config>
<session-timeout>500</session-timeout>
</session-config>
<!-- web 中所有的标签库 -->
<taglib>
<taglib-uri>/mytaglib</taglib-uri>
<taglib-location>/WEB-INF/mytaglib.tld</taglib-location>
</taglib>
<!-- 配置资源引用:servlet 容器管理某个 JNDI Resource -->
<resource-ref>
<description>DB Connection</descrition>
<res-ref-name>jdbc/sampleDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<!-- 配置安全登录验证页 -->
<login-config>
<auth-method>FORM</auth-method>
<realm-name>Tomcat Server Configuration Form-Based Authentication Area<realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-login-config>/check.jsp</form-login-config>
<form-error-page>/error.jsp</form-error-page>
</form-login-config>
</login-config>
</web-app>
web.xml配置详情 - 简要介绍的更多相关文章
- SpringMvc web.xml配置详情
出处http://blog.csdn.net/u010796790 1.spring 框架解决字符串编码问题:过滤器 CharacterEncodingFilter(filter-name) 2.在w ...
- web.xml 配置介绍
这个不是原创,有点早了,具体从哪里来的已经记不得了.但是东西是实实在在的. 1.启动一个WEB项目的时候,WEB容器会去读取它的配置文件web.xml,读取<listener>和<c ...
- java web.xml配置详解(转)
源出处:java web.xml配置详解 1.常规配置:每一个站的WEB-INF下都有一个web.xml的设定文件,它提供了我们站台的配置设定. web.xml定义: .站台的名称和说明 .针对环境参 ...
- tomcat web.xml配置
关于Tomcat 中 web.xml 文件的配置问题: 1.下面的配置是合法的 <servlet> <servlet-name>test</serv ...
- springmvc web.xml配置之 -- SpringMVC IOC容器初始化
SpringMVC IOC容器初始化 首先强调一下SpringMVC IOC容器初始化有些特别,在SpringMVC中除了生成一个全局的spring Ioc容器外,还会为DispatcherServl ...
- Maven系列--web.xml 配置详解
一 .web.xml介绍 启动一个WEB项目的时候,WEB容器会去读取它的配置文件web.xml,读取<listener>和<context-param>两个结点. 紧接着,容 ...
- ssm框架中,项目启动过程以及web.xml配置详解
原文:https://blog.csdn.net/qq_35571554/article/details/82385838 本篇主要在基于SSM的框架,深入讲解web.xml的配置 web.xml ...
- Web.xml配置详解(转)
Web.xml配置详解 Posted on 2010-09-02 14:09 chinaifne 阅读(295105) 评论(16) 编辑 收藏 1 定义头和根元素 部署描述符文件就像所有XML文件一 ...
- java web.xml配置详解
1.启动一个WEB项目的时候,WEB容器会去读取它的配置文件web.xml,读取<listener>和<context-param>两个结点. 2.紧急着,容创建一个Servl ...
随机推荐
- BizTalk开发系列(二十九) 宏的使用
在BizTalk中可以使用宏集合动态的让BizTalk发送处理程序使用单独的值来替换宏.常用的使用宏的发送程序有:文件发送适配器和SMTP发送适 配器.在表达式中可以使用同时使用多个宏.例如:在文件发 ...
- 【转】解决jsp参数传递乱码的问题
解决jsp参数传递乱码的问题 计算机生于美国,英语是他的母语,而英语以外的其它语言对他来说都是外语.他跟我们一样,不管外语掌握到什么程度,也不会像母语那样使用得那么好,时常也会出一些“拼写错误”问题. ...
- IOS第15天(1,事件处理View的拖拽)
*******view 一些方法 #import "HMView.h" @implementation HMView // 一个完整的触摸过程 // touchesBegan -& ...
- mysql5.5手册读书日记(2)
<?php /* * * MySQL_5.5中文参考手册 485开始 * * mysql> SELECT CASE 1 WHEN 1 THEN 'one' -> WHEN 2 THE ...
- Portable Operating System Interface for uni-X
https://kb.iu.edu/d/agjv Short for "Portable Operating System Interface for uni-X", POSIX ...
- Android中Parcelable接口用法
from: http://www.cnblogs.com/renqingping/archive/2012/10/25/Parcelable.html Interface for classes wh ...
- 孟加拉央行SWIFT攻击事件恶意木马分析(转)
第一章 分析概述 该恶意木马样本为运行于winodws平台上的PE文件(名称:evtdiag.exe).文件大小为64KB,编译时间是2016年2月5日. 经分析,该样本为定制的攻击SWIFT客户端程 ...
- jquery实现nav的下拉
<script type="text/javascript"> $(function(){ //tab_flag 根据此标记判断是否由父级nav指向了nav_list ...
- What is the difference between a Clustered and Non Clustered Index?
A clustered index determines the order in which the rows of a table are stored on disk. If a table h ...
- Python常用模块之sys
Python常用模块之sys sys模块提供了一系列有关Python运行环境的变量和函数. 常见用法 sys.argv 可以用sys.argv获取当前正在执行的命令行参数的参数列表(list). 变量 ...