JSP built-in object (1)
Today, a major study of the built-in JSP target. What is the object? In object-oriented programming, object refers to as a complete entity from the operation and composition of variable data.
Target is based on the specific model, the object of customer service through the use of object methods or by a group of related functions to the interface of the object data, and then the client can call these methods in the implementation of a particular operation.
JSP's built-in objects are as follows: request, response, out, the session, pagecontext, application, config, page.
â—† Request object [request]
Request to accept all objects from the browser to your server, the request for all information.
And the request is linked to HttpServletRequest category. Through getParameter request parameters could be obtained through GET, POST, and HEAD methods can be the type of request, through cookies, Referer such as HTTP can be introduced first.
â—† Response object [response]
Response object to the client browser to send data, users can use the Object data will be sent to the server the client browser.
Response associated with the HttpServletResponse category.
â—† Out target
Out target for the output data to the client.
â—† Session object [work]
Session objects were kept for every target user information in order to track users in the operation of state.
Session associated with the HttpSession category Session is automatically created.
Note: different user corresponding Session object is generally not the same.
â—† pageContext target
PageContext objects belonging to JSP for the management of the special part that the visit has been named object. JSP in a new category.
â—† Application Object [applications]
Application objects used in a number of procedures in the preservation of information. Used in the sharing of information among all users, and Web applications can be sustained during the operation to maintain data.
Associated with the application of ServletContext is through the use of getServletConfig (). GetContext () method. Once created application object, the object would have been maintained, until the server is closed down.
Note: Each user's application object is the same, each user share the same application objects.
â—† Config target
Config object JSP processing procedures used to configure the handle, but only within the framework of legitimate JSP pages.
It is a kind of ServletConfig object.
â—† Page Object
Page target only for the preservation of the language is not in the script at the time JAVA, JAVA not practical.
Learned here today and tomorrow JSP detailed study of the built-in objects Request object.








0 Comments to “JSP built-in object (1)”
No Comments. Send your comment.
Leave a Reply
You must be logged in to post a comment.