1. The setattribute and GetAttribute methods of the request are generally paired, first set the property and property values through the SetAttribute method, and then
The GetAttribute method gets the object value corresponding to the property based on the property ( generally requires a down-type conversion to convert the property value to a real object ). Both the setattribute and GetAttribute methods are performed internally on the server side, and the client does not know whether the server has performed these two methods.
2. The function of the GetParameter method of the request is to obtain a parameter value sent to the client via a form or URL request parameter. is the interaction between the client and server side, the server to obtain the data sent to the client, you need to use the GetParameter method to obtain, there is no Setparameter method corresponding to the GetParameter method.
3. The scope of the data within the request object is within the scope of the request object's survival, when the client sends a request to the server, the server returns a response to the client, the request object is destroyed, and then a new request is sent to the server side. The server creates a new request object that has no relationship to the request object before the request object, and therefore cannot obtain any data stored in the previous request object.
The survival range of the data within the 4.session object is the survival range of the Session object (* * * * * * * * * * * * * * * * * * * * * * * * * * No matter how many requests are sent to the server, there is only one session object (note: That is, the value you put in will always exist in the session object, as long as your browser does not close (it feels like a queue)).
Summary: For example, request and session each set a hyperlink, but request cannot get the value of the original page, but the session can ...
5. Application (Application Object): The object with the largest surviving range, as long as the server is not closed, the data in the Application object will persist. During the entire server run, there is only one application object.
The difference and similarity of JSP about resquest and session and application