当前位置:网站首页>Talking about Servlet
Talking about Servlet
2022-07-29 05:33:00 【Xiao Hong is working hard】
What is? Servlet?
Simply speaking Servlet yes java Write a server-side program , Running on the web Server , It is a component of dynamic web pages spliced by different users .
Servlet What's the role ?
- Receive the request from the client
- Call other java Program to process requests
- Will deal with the result , Return to the server
Servlet How to create ?
1、 Create class inheritance HttpServlet
2、 Override unimplemented methods –service Method
Servlet Life cycle of ( a key )
We study Servlet The life cycle of mainly studies the following points :
Construction method :
- establish servlet Object . By default , First visit to this servlet Call the constructor to create an object . The constructor is called only once ,servlet The object is tomcat Is a singleton .
init(); Method :
- Created servlet Object . Just call 1 Time .
service();:
- Call this method every time the browser makes a request . Callable n Time .
destory();
- The destruction servlet Object . for example : Stop the server or redeploy web Destroy when applying servlet object . Call it once .
边栏推荐
- Integer overflow and printing
- Li Kou 994: rotten orange (BFS)
- Day 2
- 时间复杂度和空间复杂度
- ANSI C类型限定符
- Using POI TL to insert multiple pictures and the same data of multiple rows of cells into the table cells of word template at one time, it is a functional component for automatic merging
- Database operation day 6
- 省市区三级联动(简单又完美)
- Topological ordering of a graph of water
- Alibaba cloud Zhang Xintao: heterogeneous computing provides surging power for the digital economy
猜你喜欢
![[event preview] cloud digital factory and digital transformation and innovation forum for small and medium-sized enterprises](/img/6f/f7c5d605ea9b7b9e7c49ac716492ef.jpg)
[event preview] cloud digital factory and digital transformation and innovation forum for small and medium-sized enterprises

About local variables

MySQL的详细安装使用教程(保姆式安装图文讲解)

浅谈范式

Alibaba cloud architect details nine trends in the game industry

【C语言系列】— 打印100~200之间的素数

Detailed explanation of serial port communication

Application of Huffman tree and Huffman coding in file compression

Day 3

【剑指offer】— 详解库函数atoi以及模拟实现atoi函数
随机推荐
抽象类与接口
·来一篇编程之路的自我介绍吧·
分配内存:malloc()和free()
Database operation day 6
C language file operation
指针
Topological ordering of a graph of water
167. Sum of two numbers II - enter an ordered array
MySQL的详细安装使用教程(保姆式安装图文讲解)
ClickHouse学习(八)物化视图
Day 5
During the appointment, the 2022 JD cloud industrial integration new product launch was launched online
C语言文件操作
365 day challenge leetcode 1000 questions - day 041 two point search completion anniversary + nth magic number + online election
Yangyonglin, vice president of Rushi Technology: when traditional industries encounter "digital space"
Application of Huffman tree and Huffman coding in file compression
ClickHouse学习(十一)clickhouseAPI操作
Occt learning 002 - environment construction
阿里云张新涛:异构计算为数字经济提供澎湃动力
Occt learning 001 - Introduction