Javaweb explain what a servlet is?

Source: Internet
Author: User
Tags configuration settings

A servlet is a Java technology that is independent of the Platform and Protocol of the server, and can generate dynamic Web pages compared to traditional CGI (computer graphics interfaces) and other similar CGI techniques. Servlets have better portability. More powerful features, less investment, higher efficiency, better security.

Servlets are Java programs that use Java servlet application interfaces (APIs) and related classes and methods. The Java language can implement a function servlet is basically possible. (in addition to the graphical interface). The servlet is primarily used to process HTTP requests from the client and returns a response, usually the servlet refers to HttpServlet, which handles HTTP requests, which can handle requests with doget (), DoPost (), service (), etc. Javax.servlet,http can be formed directly when the servlet is developed. HttpServlet.

The servlet needs to be described in Web. XML, for example. The map executes the name of the servlet, configures the servlet class, initializes the parameters, makes the security configuration, URL mappings, and sets the startup priority. Not only can the servlet generate HTML script output, but it can also generate a binary tab output.

· The servlet is widely used, and many popular frameworks are now supported by Servlets, such as when the Shh,spring container is started, to load spring containers and Actioncontext in Web,xml to initialize some of the spring's parameters. such as dependency injection, database table mapping, initialization of the system's security configuration settings read and other properties for some related operations.

Javaweb explain what a servlet is?

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.