Abstract online:
1. at a deeper level, the data transmitted by the request. getparameter () method will be transmitted from the Web Client to the Web server, representing the HTTP request data.
The request. getparameter () method returns string-type data.
The data transmitted by the request. setattribute () and getattribute () methods only exists in the Web Container and is in the web group with forwarding relationship.
Shared among devices. These two methods can be used to set object-type shared data.
Request. getparameter () is achieved through the implementation of the container to obtain data transmitted through methods such as post and get.
Request. setattribute () and getattribute () are only transferred within the Web Container and are only the request processing phase.
Getattribute is the returned object, and getparameter returns the string
In general, the request. getattribute () method returns objects in the request range, while
The request. getparameter () method is used to obtain the data submitted by HTTP.
2. Request is something that comes from the user, attributes come from
Session
3.use request. getparameter () when u are planning to fetch values from a
html/JSP page, and use requets. getattribute () when u want to fetch
attribute values which are set using request. setattribute () in a
servlet.