Learn servlet notes

Servlet (Server Applet), full name of the Java Servlet, No Chinese translation of the word is to create an environment in Java applet, Java applet is a small program as a separate file sent along with pages, it is usually for the customer end of the run, the operational result for the user or the user interaction services finder pattern. Is a server-side program written in Java, and its main function is to interactively view and modify data, generate dynamic Web content. Refers to a narrow Servlet interface to the Java language, broadly refers to any Servlet class implements the Servlet interface, under normal circumstances, people will understand Servlet for the latter.

Servlet running on Java-enabled application servers. In principle, Servlet can respond to any type of request, but in most cases only used to extend the Servlet Web server based on HTTP protocol. JavaServlet advantage is that they are faster to execute a CGI program (CGI stands for "Common Gateway Interface" (Common Gateway Interface), HTTP server for a tool to "talk" with the program on your or other machine, which program to be run in a web server on). Each user request is activated into a single-threaded program, without having to create a separate process, which means that the server processes the request overhead will be significantly reduced.

The earliest support JavaSoft Servlet technology is the Java Web Server. Since then, some other Java-based Web Server started to support the standard Servlet API. Servlet main function is to interactively view and modify data, generate dynamic Web content. This procedure is:
1) The client sends a request to the server;
2) the server request information to the Servlet;
. 3) generates the Servlet response content and pass on to the server. In response to dynamically generated content, usually depends on the client's request;
4) the server returns the response to the client.

Guess you like

Origin www.cnblogs.com/zhuriblog/p/11518017.html