Servlet with JSP notes

xiaoxiao2021-03-06  14

Servlet container: Responsible for handling customer requests, transferring the request to servlet and returning the result to the customer. The actual implementation of the container of different programs may vary, but the interface between the container and the servlet is defined by servletAPI. This interface defines the method of the servlet container to be called on the servlet and passed to the SERVLET. Eight objects in JSP: 1. Request represents the httpserbletRequest object, which contains information about the browser request and provides a number of useful methods for getting cookie, header, and session data. 2, Response represents the httpservlerResponse object and provides several methods for setting the response to the browser (such as cookies, header information, etc.) 3, the OUT object is Javax. JSP. An instance of JSpWriter and provides several ways to make you use to return the output results to your browser. 4, PageContext represents a Javax. servlet. JSP. PageContext object. It is used to facilitate access to various ranges of namespaces, servlet-related objects, and package the general service-related functionality 5, Session represents a request Javax. servlet. HttpSession object. Session can store the user's status information 6, Application represents a Javax. servlet. ServletContext object. This helps find information about the Servlet engine and the servlet environment 7, config represents a JavaX. servlet. ServletContext object. This object is used to access the initialization parameters of the servlet instance. 8. Page represents a servlet instance generated from this page.

转载请注明原文地址:https://www.9cbs.com/read-46906.html

New Post(0)