Important HTTPServletRequest object properties

The following list shows some important properties on the request object. The example values for these properties relate to the following URL:

http://localhost:8180/pc/service/test0?abc
RequestURL
The URL that the client used to make the request

Example value: http://localhost:8180/pc/service/test0

RequestURI
The part of this request’s URL from the protocol name up to the query string in the first line of the HTTP request

Example value: /pc/service/test0

QueryString
The query string in the request URL after the servlet query path and the ? character, if present

Example value: abc

PathInfo
Any extra path information associated with the URL that the client sent when it made this request

Example value: /test0

HeaderNames
All the names of the request headers as an Enumeration of String objects

Not all servlet containers provide the value of this property.

See also