Js| object today mainly studied the built-in object of JSP. What is an object? In object-oriented programming, an object is a variable consisting of operations and data as a complete entity.
Objects are based on a specific model in which the client uses the object's services to access the data of the object through an interface of a set of methods or related functions, and the client can then call these methods to perform an operation.
JSP built-in objects have the following: request, response, out, session, PageContext, Application, config, page.
request[Request] Object
The request object is used to accept all information from the browser sent to your server.
Associated with request is the HttpServletRequest class. The request parameter can be obtained by getparameter method, and the type of request can be obtained by means of get, POST and head, and the HTTP headers can be introduced by cookies, referer, etc.
response[Response] Object
The response object is used to send data to the client browser that the user can use to send the server's data to the browser at the user's end.
Associated with response is the HttpServletResponse class.
Out objects
An Out object is used to output data to the client.
session[work] Object
The session object is used to save objects for each user's information, so that the user's operational status can be tracked.
The session is associated with the HttpSession class, which is created automatically.
Note: The corresponding session objects for different users are generally not the same.
PageContext objects
The PageContext object is used to manage access to a named object that belongs to a particular visible part of the JSP. A new class in the JSP.
application[Application] Object
The Application object is used to save information in multiple programs. Used to share information among all users, and to persist data over time while the Web application is running.
Associated with application is the ServletContext class, which is obtained by using the Getservletconfig (). GetContext () method. Once the Application object is created, the object remains until the server shuts down.
Note: Each user's Application object is the same, and each user shares the same application object.
Config object
Config object is used to configure handles for JSP programs and is valid only within the scope of the JSP page.
It is an object of a ServletConfig class.
Page Object
The Page object is used only when the script's language is not Java, and is not practical in Java.
Here today, learn more about the request object in the JSP built-in object tomorrow.
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.