GetParameter
① All the results are of the String type. Like http://name.jsp? Xy in name = xy
② Obtain the parameter value passed by POST/GET
③ Used for client redirection. For example, when you click a link or submit a button, it is used to receive data when using form or url redirection for value passing.
GetAttribute
① The retrieved type is Object.
② Used for server-side redirection, that is, using the forward function in sevlet or the getter/setter attribute in struts. GetAttribute can only receive values sent from the program using setAttribute.
③ Session. getAttribute () can obtain the session
EL expression
You can use the expression language to directly obtain the request parameter value. You can obtain the specified attribute value of the JavaBean on the page, the request header, and page, request, session, and application.
EL expressions have 11 built-in objects
PageContext
Pagination
RequestScope
SessionScope
ApplicationScope
Param
ParamValues
Header
HeaderValues
InitParam
Cookie
If you use request. setAttribute ("name", "xy") in the request field, you can use $ {requestScope. name}
Such as xy. jsp? Name = xy, which must be obtained through $ {param ["name "]}