当前位置:网站首页>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 .
边栏推荐
- 指针
- Alibaba cloud and Dingjie software released the cloud digital factory solution to realize the localized deployment of cloud MES system
- Common shortcut keys for Ad
- C语言数组入门到精通(数组精讲)
- Application of Huffman tree and Huffman coding in file compression
- Cryengine3 debugging shader method
- 关于局部变量
- Vs code的安装步骤及环境配置
- Terminal shell common commands
- 存储类别
猜你喜欢

牛客网编程题—【WY22 Fibonacci数列】和【替换空格】详解

The road to success in R & D efficiency of 1000 person Internet companies

B - 识别浮点常量问题

510000 prize pool invites you to fight! The second Alibaba cloud ECS cloudbuild developer competition is coming

力扣994:腐烂的橘子(BFS)

Alibaba cloud architect details nine trends in the game industry

Preemptive appointment | Alibaba cloud shadowless cloud application online conference appointment opens

Pyqt5: Chapter 1, Section 1: creating a user interface using QT components - Introduction

Li Kou 994: rotten orange (BFS)

·来一篇编程之路的自我介绍吧·
随机推荐
C language one-dimensional array
阿里云架构师细说游戏行业九大趋势
C语言 一维数组
Day 5
浅谈Servlet
B - identify floating point constant problems
数据库操作 Day 6
GPIO的输入输出详解
With cloud simulation platform, Shichuang technology supports the upgrading of "China smart manufacturing"
Yangyonglin, vice president of Rushi Technology: when traditional industries encounter "digital space"
省市区三级联动(简单又完美)
JD cloud and Forrester consulting released a hybrid cloud report that cloud Nativity has become a new engine driving industrial development
全局components组件注册
365 day challenge leetcode 1000 questions - day 041 two point search completion anniversary + nth magic number + online election
串口通讯部分详解
【C语言系列】— 不创造第三个变量,实现两个数的交换
B - 识别浮点常量问题
365 day challenge leetcode 1000 questions - day 037 elements and the maximum side length of squares less than or equal to the threshold + the number of subsequences that meet the conditions
Bubble sort c language
Differences between texture2d and texture2dproj under webgl1.0