Common methods for Request objects in JSP summary __jsp

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 for all properties of the request object, with the result being an instance of an enumeration

GetCookies (): Returns all cookie objects for the client, resulting in an array of cookies

Getcharacterencoding (): Returns the character encoding method in the request

Getcontentlength (): Returns the length of the requested body

GetHeader (String name): Get file header information for HTTP protocol definitions

Getheaders (String name): Returns all values for the request header of the specified name, with the result being an instance of an enumeration

Getheadernames (): Returns the name of the request header, and the result is an enumerated instance

getInputStream (): Returns the requested input stream, which is used to obtain the data in the request

GetMethod (): Get client to server-side data transfer method

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

Getparameternames (): Gets the name of all the parameters that the client sends to the server side, and the result is an enumerated instance

Getparametervalues (String name): Gets all values that have the parameters specified by name

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

GetQueryString (): Get query string

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

GETREMOTEADDR (): Get the IP address of the client

Getremotehost (): Get the name of the client

GetSession ([Boolean create]): Return and request related session

getServerName (): Get the name of the server

Getservletpath (): Gets the path to the script file requested by the client

Getserverporti (): Gets the port number of the server

RemoveAttribute (String name): Delete a property in the request

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.