Servlet Servlet create the basic steps of

In a broad sense: Servlet specification is Sun's technical standards, contains a series of interfaces associated with Web applications (including Listener, Filter, etc.).

Narrow sense: Servlet especially javax.servlet.Servlet interfaces and sub-interfaces

  A servlet is a small Java program, servlets running on a web server (Tomcat), servlet receives and responds to requests from the client. Through hypertext transfer protocol (http)

So, Servlet role:

    1, to accept the request

    2, the processing request

    3, complete response

 Of course, the servlet request is not processed any more information to the Servlet arranged in web.xml

    Details include: 1, tells the server class information [I] have the servlet class

 

 

           2, configuration information which [the servlet to handle requests]

 

Write Servlet steps:

    1, create a XXX class, implement the interface Servlet

    2, to achieve service process (there are many methods in the interface, the service request is processed)

    3, the configuration information in the web.xml servlet

 

Servlet understood with reference to FIG Thor

 

Guess you like

Origin www.cnblogs.com/Timeouting-Study/p/12576798.html