JavaWeb learning summary_Servlet development
1. Introduction to Servlet
2. The running process of Servlet
The Servlet program is called by the Web server. After the web server receives the client's Servlet access request:
The WEB server first checks whether it has been loaded and created an instance of the Servlet object. If yes, go to step 4 directly, otherwise go to step 2.
Load and create the init() method of the Servlet instance object
Call the init() method of the Servlet instance object
Create an HttpServletRequest object used to encapsulate the HTTP request message and an HttpServletResponse object representing the Http corresponding message, and then call Servlet's service() method, and the request and response objects are passed in as parameters.
Before the Web application is stopped or restarted, the Servlet engine will uninstall the Servlet and call the Servlet's destroy() method
3. Servlet call graph
4. Servlet access URL mapping configuration
Same Servlet Can be mapped to multiple URLs, that is, the setting value of the
<servlet> <description></description> <display-name>ServletDemo1</display-name> <servlet-name>ServletDemo1</servlet-name> <servlet-class>com.atguigu.servlet.ServletDemo1</servlet-class> </servlet> <!-- 同一个servlet可以映射到多个url --> <servlet-mapping> <servlet-name>ServletDemo1</servlet-name> <url-pattern>/servletDemo1</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>ServletDemo1</servlet-name> <url-pattern>/1.html</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>ServletDemo1</servlet-name> <url-pattern>/2.htm</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>ServletDemo1</servlet-name> <url-pattern>/3.htm</url-pattern> </servlet-mapping>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics









