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 presentExample 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
EnumerationofStringobjectsNot all servlet containers provide the value of this property.
See also
- For full documentation on this class, refer to this Oracle Javadoc page:
http://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpServletRequest.html
- For full documentation on the HTTPServletResponse class, refer to this Oracle Javadoc
page:
http://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpServletResponse.html
