当前位置:网站首页>Lifecycle of Servlet
Lifecycle of Servlet
2022-06-22 09:13:00 【C_ x_ three hundred and thirty】
Servlet The life cycle of can be expressed in three ways :
- init(): Only once , Responsible for loading Servlet Initializes Servlet object
- service() : The core approach , commonly HttpServlet There will be get,post Two ways to deal with it . Calling doGet and doPost Method is constructed servletRequest and servletResponse Request and response objects as parameters .
- destory(): Stop and uninstall Servlet When the , Responsible for releasing resources
Initialization phase :Servlet start-up , Will read the information in the configuration file , Constructs the specified Servlet object , establish ServletConfig object , take ServletConfig Called as an argument init() Method .
init() Further explanation of
1. load Servlet Class and .class Corresponding data
2. establish ServletConfig object
3. establish Servlet object
Every time a request comes to the container , Will produce HttpServletRequest And HttpServlceResponse object , And in the call service() Method is passed in as a parameter .
stay WEB After the container starts , Will read Servlet Set up information , take Servlet Class loads and instantiates , And for each Servlet Setting information generates a ServletConfig object , And then call Servlet Interface init() Method , And will produce ServletConfig Object is passed in as a parameter .
边栏推荐
- [detailed explanation] point multiplication and cross multiplication of neural network matrix (pytorch version)
- 模糊查询和聚合函数
- 值(址)传递,看清名字,别掉沟里
- 微表情数据集汇总(全)
- np.arange与np.linspace细微区别(数据溢出问题)
- np. Arange and np Linspace nuances (data overflow problem)
- pytorch的模块使用:线性模型(未完成)
- Manually mining XSS vulnerabilities
- IS_ERR()
- C语言刷题 | 三目运算实现判断大写(16)
猜你喜欢

5道面试题,拿捏String底层原理!

VMware installation Kali

文件小能手---multer

Node cannot recognize the 'node' entry as the name of a cmdlet, function, script file, or runnable program. Please check the spelling of the name. If the path is included, make sure the path is correc

Solidity from introduction to practice (II)

threejs实现简单全景看房demo

ffmpeg之volumedetect

Solidity from introduction to practice (6)

逻辑回归和线性回归

值(址)传递,看清名字,别掉沟里
随机推荐
Solidity from introduction to practice (III)
==Classic interview questions
Didi's two-sided summary
Opencv daily function histogram correlation (3)
Phpexcel reads the contents of the xls/xlsx table and saves it as a CSV file
接口抽象类的比较
How much do you know about the required encryption industry terms in 2022?
File upload attack and protection
Record some Oracle operation commands
[qnx hypervisor 2.2 user manual]5.6 close guest
VMware installation Kali
STM32在线升级BootLoader跳转APP时死机问题
开发报错记录
simple_ Strtoull character conversion related functions
scnprintf和snprintf的区别
进程状态汇总
C语言刷题 | 输入一个数输出对应的值(13)
PHP seven methods to obtain complete instances of file name suffixes [collect]
DOM编程
值(址)传递,看清名字,别掉沟里