The main methods of the Java Request object:

Source: Internet
Author: User

Tag:length   parameter    Information    request Object    create    val    Data     Services     coding    


SetAttribute (String name,object): Sets the parameter value of the request named Name
GetAttribute (string name): Returns the property value specified by name
Getattributenames (): Returns a collection of names for all properties of the request object, resulting in an instance of enumeration
GetCookies (): Returns all cookie objects for the client, resulting in an array of cookies
Getcharacterencoding (): Returns the character encoding in the request
Getcontentlength (): Returns the length of the requested body
GetHeader (String name) : Gets the header information for the HTTP protocol definition
Getheaders (String name): Returns all values of the request header for the specified name, resulting in an instance of an enumeration
Getheadernames () : Returns the name of the request header, which results in an instance of enumeration
getInputStream (): Returns the requested input stream for obtaining data in the request
GetMethod (): A way to get the client to send data to the server
GetParameter (String name): Gets the parameter value that the client sends to the server side with name specified
Getparameternames (): Gets the name of all parameters that the client sends to the server side, and the result is an instance of the enumeration
Getparametervalues (String name): Gets all values for the parameter specified by name
Getprotocol (): Get the Protocol name by which the client transmits data to the server
GetQueryString () : Get query string
Getrequesturi (): Gets the client address of the issuing request string
Getremoteaddr (): Gets the IP address of the client
Getremotehost (): Gets the name of the client
GetSession ([Boolean create]): Returns and requests related session
getServerName (): Gets the name of the server
Getservletpath (): Gets the path of the script file requested by the client
Getserverport (): Gets the port number of the server

The main method of the

Java Request object:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.