Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Programming \ Servlet life cycle works     - Java integrated development environment common set of operations (Linux)

- Installation Experience open source car Automotive Grade Linux system (Linux)

- Linux process management related content (Linux)

- Linux Shell Scripting Interview Question (Linux)

- Oracle 12C modify spfile path (Database)

- Graphics of Java Tools (Programming)

- Linux system with a firewall to prevent the DOS attack (Linux)

- Loop arrays in C language is not easy to find a bug (Programming)

- Linux system security settings after installation (Linux)

- Is Linux the most secure operating system (Linux)

- OpenStack Folsom create an instance of the failure of the Quota Fixed_IP articles (Server)

- Difference in MySQL VARCHAR and CHAR data format (Database)

- SELinux multi-level security (Linux)

- CentOS6.5 install SVN & visual management tools iF.SVNAdmin (Server)

- Python developer of time-saving method (Programming)

- Linux foreground to background process switch (Linux)

- Xtrabackup creates a slave node without downtime (Database)

- C / C ++ language usage summary of const (Programming)

- How to configure chroot environment in Ubuntu 14.04 (Linux)

- To learn from scratch OpenWrt perfect tutorial (Linux)

  Servlet life cycle works
  Add Date : 2018-11-21      
  1, Servlet life cycle:

    Servlet loading, loading, service and destroyed.

2, the typical function explanation:

    Init (): This function is used to initialize the Servlet object. In the Servlet life cycle Servlet function is performed only once.

    Destroy (): This function is used to destroy the Servlet object Similarly, Servlet life cycle Servlet function is performed only once.

    Service (): This function is to respond to customer requests Servlet objects when in use. Is the core function of the Servlet. There are two parameters: HTTPRequest, HTTPResponse. HTTPServlet already has Service method, the default service function is to call and request a consistent approach do function.

3, tomcat and Servlet is how it works:

Web client makes a request to the Servlet container (tomcat)
Tomcat receives a request
Servlet container creates a HTTPRequest object into the Web client to request information.
Servlet container create a HTTPResponse object.
Servlet container calls HTTPServlet Service object method, HTTPRequest and HTTPResponse go into the Service function.
HTTPServlet call the relevant method in the request for information HTTPRequest.
HTTPServlet call the relevant methods to generate HTTPResponse.
Servlet returns the results to the corresponding Web client.
4, Servlet works:

    The client sends a request and Servlet container creates based on the request of ServletRequest and ServletResponse, then call the Servlet Service method to obtain the requested information, processes it, and returns a response.

    The method in which the Service Selection and do request method corresponding features, such as doGet, doPost methods. In the Servlet and GenericServlet these methods is no need to define themselves. Although these methods HTTPServlet, but returned Error message, we need to reload themselves.

    Servlet and GenericServlet is not based on any agreement, and HTTPServlet is based on HTTP protocol.
- Using DBMS_STAT function closes mission (Database)
- Linux non-graphical interface to install Oracle Database (Database)
- MySQL completely uninstall and install Configuring Character Sets under Linux (Database)
- Linux deploy Tutorial (Linux)
- Kibana Apache Password Authentication (Server)
- Tab set to four spaces in Vim (Linux)
- Apache Spark1.1.0 deployment and development environment to build (Server)
- Three methods easy data encryption on Linux (Linux)
- Encrypted with GnuPG signature to verify the authenticity and integrity of downloaded file (Linux)
- Easy to install Ubuntu 15.04 and Ubuntu 15.04 GNOME on Wayland trial (Linux)
- What Java 8 fastest garbage collector (Programming)
- Install VMware Tools in Debian (Linux)
- Linux Command Tutorial: Ubuntu apt-get command (Linux)
- RedHat Linux 9.0 under P4VP-MX motherboard graphics resolution of problems (Linux)
- Ubuntu installed Komodo editor by PPA (Linux)
- Use HugePages optimize memory performance (Database)
- ActiveMQ5.11.1 and JDK version matching relation (Linux)
- Simple configuration shell scripts virtual machine environment experiment (Linux)
- The hash function under OpenSSL (Linux)
- Ubuntu Tutorial: How to Upgrade a New Linux Kernel 3.12.7 on Ubuntu (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.