The main method of the request object and its role

Source: Internet
Author: User

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 of all properties of the request object, resulting in an instance of an enumeration

GetCookies (): Returns all cookie objects for the client, as a result of a cookie array

Getcharacterencoding (): Returns the character encoding in the request

Getcontentlength (): Returns the length of the requested body

GetHeader (String name): Gets the file header information defined by the HTTP protocol

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, and the result is an instance of the enumeration

getInputStream (): Returns the requested input stream for obtaining the data in the request

GetMethod (): Obtaining a client's way of transmitting data to the server side

GetParameter (String name): Gets the parameter value specified by the client that is passed to the server side by name

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 that have the parameter specified by name

Getprotocol (): Gets the protocol name on which the client transmits data to the server

GetQueryString (): Get query string

Getrequesturi (): Gets the client address that issued the request string

GETREMOTEADDR (): Gets the IP address of the client

Getremotehost (): Gets the name of the client

GetSession ([Boolean create]): Returns and requests the relevant 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

RemoveAttribute (String name): Delete One of the properties in the request

The main method of the request object and its role

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.