The HttpServletRequest class has a setattribute () method, but no Setparameter () method
When GetParameter () is used for client redirection , the linked component obtains request parameters through the GetParameter () method when there is a link between two Web Components
When GetAttribute () is used for server side orientation , when a forwarding relationship is between two Web components, the forwarding target component shares the request with the forwarding source component through the GetAttribute () method. The data within the session scope.
From a deeper level of consideration,
The data passed by the Request.getparameter () method is uploaded from the Web client to the Web server side, representing the HTTP request data . The Request.getparameter () method returns the data of type string .
The data passed by the Request.setattribute () and GetAttribute () methods only exist within the web** container and are shared among Web components that have forwarding relationships . These two methods can set the **object type of shared data.
Request.getparameter () acquisition is achieved through the implementation of the container to obtain through similar post,get and other means of data passed in. is uploaded from the Web client to the Web server, representing the HTTP request data , returning the string
Request.setattribute () and getattribute () are only circulated within the Web container, only as part of the request processing phase, and are shared among Web groups that have forwarding relationships. These two methods can set the shared data of type Object .
Overall:
Request.getattribute () method returns an object that exists within the Reques,sessiont range
The Request.getparameter () method is to get the data that HTTP submits over.