Head first Servlet/jsp Study Notes (1)

Source: Internet
Author: User

When I was visiting a bookstore, I accidentally found this book amazing. So I bought it and showed it to the students. After a few months, I am idle and ready to look at the system. Although I have made two struts, spring, and hibernate projects, I feel that the knowledge is not very systematic.

1. servlet does not have the main () method, and they are controlled by another Java application called "Container:

HTTP request -----> Web Server ----- (Servlet request)

-----> Servlet container (create httpservletresponse and httpservletrequest and pass them to matching dservlet)

-----> Call the servlet Service () method to determine the request type and call dopost () or doget ()

Container function:

  • Communication support: establishes a serversocket and listens to a port for communication with the Web server.
  • Lifecycle management: Load classes, instantiate and initialize Servlets, call servlet methods, and recycle servlets.
  • Multithreading support: Creates a new thread for each Servlet Request
  • Security Declaration: Use the XML deployment description file to configure and modify Security
  • JSP support: translate JSP code into real Java
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.