当前位置:网站首页>Filter and listener listeners
Filter and listener listeners
2022-04-21 12:52:00 【InfoQ】
- init() Method : Create after the server starts Filter object , call init Method , Only once , Used to load resources
- doFilter() Method : Called every time a request is intercepted and a resource is requested , Multiple executions
- destory() Method : Called when the server shuts down normally distory Method destruction Filter object , Only once , Used to free resources
- Specific resource paths :/index.jsp ==> Only visit index.jsp Resource time , The filter will be executed
- Intercept Directory :/user/* ==> visit /user All resources under , Filters are executed
- Suffix blocking :*.jsp ==> Access all suffixes and ask jsp Resource time , Filters are executed
- Intercept all resources :/* ==> Access any resource , Filters are executed
- Annotation configuration ( Set the name of the configuration file dispatcherTypes attribute )
- REQUEST: The default value is , Browser requests resources directly
- FORWARD: Forward access to resources
- INCLUDE: Contains access to resources
- ERROR: Wrong jump resource
- ASYNC: Asynchronous access to resources
- web.xml To configure
- To configure <dispatcher></dispatcher> Labels can be
- filter 1
- filter 2
- Resource execution
- filter 2
- filter 1
- Annotation configuration : Compare according to the string comparison rules of class names , If it's worth less, execute it first
- web.xml:<filter-mapping> Whoever is defined above will execute first
summary




版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204211242175629.html
边栏推荐
- Software engineering final exam questions and answers
- 赛事解析|乒乓球时序动作定位大赛亚军方案分享
- Algorithem_ Populating Next Right Pointers in Each Node
- mysql数据库操作语句练习
- 月销超千万,新防晒时代「蕉下」如何成为爆款制造机?
- 2022年监理工程师考试质量、投资、进度控制练习题及答案
- 二叉树遍历系列01-递归遍历与递归序
- 2020BATJZ大厂Android高级工程师面试题-选择题合集(附答案解析)
- 利用Cisco配置VRRP(虚拟路由器冗余协议)
- Validation data validation annotation
猜你喜欢
2020batjz Android Senior Engineer Interview Questions - multiple choice questions collection (with answer analysis)

How to choose the production company of product 3D display film?
AES automatically generates Base64 key encryption and decryption

网易云---手机验证码登录

上个网课都能被AI分析“在走神”,英特尔这个情绪检测AI火了

2022年监理工程师考试质量、投资、进度控制练习题及答案

二叉树遍历系列02-Morris遍历

Simulated Login of selenium's slider verification code (pig Bajie website)

Master slave replication -- 03 -- synchronization data consistency

mysql数据库操作语句练习
随机推荐
Software engineering final exam questions and answers
[thesis study] Yolo V2
[MySQL] extract and query JSON type field data
4年Android开发13K,刷完这份1307页Android-面试全套真题解析,跳槽涨薪15K
Validation data validation annotation
STM32Cubemx安装
一文了解全面静态代码分析
Decompilation of Revit secondary development
Pytest multi file execution sequence control
Revit二次开发——创建和切换标记(第十六期)
[linked list] 148 Sort linked list
Revit secondary development - creating floors (phase 12)
GSMA announced: 2022 MWC Shanghai postponed
Package rpart of decision regression tree implemented by R language
从Revit中选取元素(第五期)
Building QML applications
Revit 二次开发入门教程--用HelloRevit进行程序调试(第四期)
S TYLE N E RF: A S TYLE - BASED 3D-A WARE G ENERA - TOR FOR H IGH - RESOLUTION I MAGE S YNTHESIS
Revit二次开发——接触式过滤(第十七期)
Title and answer of G3 boiler water treatment certificate in 2022