The request object has completed the httpservletrequest interface, deciding that it can obtain Users' Request Parameters, obtain cookies, obtain HTTP request headers, and obtain users' IP addresses. The first essentials of the request object are:
Getparameter (string name) obtains the parameter value sent from the client to the server. This parameter is usually specified by the name attribute of the form.
Getparametervalues (string name) obtains all the values of the parameters sent from the client to the server and goes to a string array.
Getparameternames () obtains the names of all parameters that the client sends to the server. The result is an enumeration instance.
Getheader (string name) obtains the value of an HTTP request header.
Getheaders (string name) obtains all values of an HTTP request header.
Getheadernames () obtains the names of all HTTP request headers.
Getmethod () obtains the central request essentials (get, post ).
Getcookies () Get the cookie Array
Setattribute (string N, object O) configures an attribute and attribute value on the request.
Getattribute (string name) obtains the value of an attribute on the request object.
Removeattribute (string name) deletes an attribute of the request object.
Getattributenames () obtains the values of all attributes on the request object.
Getrequesturl () obtains the URL requested by the client.
Getrequesturi () obtains the URI requested by the client.
Getquerystring () gets the query string, that is, the string appended to the URI when the client decides to pass the get essentials.
Getservername () gets the name of the server.
Getserverport () gets the server port.
Getcontextpath () is used by the web.
Getlocaladdr () obtains the IP address of the server requested by the client.
Getremoteaddr () obtains the IP address of the client.
Getsession ([Boolean create]) goes to the httpsession related to the central request.
Getrequestdispatcher (string path) obtains the requestdispatcher object corresponding to the path.
Setcharacterencoding (string ENC) configures the character set used by the central parameter.