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?