Package org.zeroturnaround.javarebel
Interface RebelHttpServletRequest
-
public interface RebelHttpServletRequestHttp servlet request interface visible to JRebel agent.Separate interface is required as the
javax.servlet.http.HttpServletRequestinterface is not loaded by the boot class loader.In practice a bytecode processor makes
javax.servlet.http.HttpServletRequestto extend the given interface.- See Also:
ServletIntegration
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetHeader(String name)Returns the value of the specified request header as aString.StringgetMethod()Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.StringgetQueryString()Returns the query string that is contained in the request URL after the path.StringgetRequestURI()Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request.StringBuffergetRequestURL()Reconstructs the URL the client used to make the request.
-
-
-
Method Detail
-
getRequestURL
StringBuffer getRequestURL()
Reconstructs the URL the client used to make the request. The returned URL contains a protocol, server name, port number, and server path, but it does not include query string parameters.Because this method returns a
StringBuffer, not a string, you can modify the URL easily, for example, to append query parameters.This method is useful for creating redirect messages and for reporting errors.
- Returns:
- a
StringBufferobject containing the reconstructed URL
-
getRequestURI
String getRequestURI()
Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request. The web container does not decode this String. For example:First line of HTTP request Returned Value POST /some/path.html HTTP/1.1 /some/path.html GET http://foo.bar/a.html HTTP/1.0 /a.html HEAD /xyz?a=b HTTP/1.1 /xyz - Returns:
- a
Stringcontaining the part of the URL from the protocol name up to the query string
-
getMethod
String getMethod()
Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT. Same as the value of the CGI variable REQUEST_METHOD.- Returns:
- a
Stringspecifying the name of the method with which this request was made
-
getQueryString
String getQueryString()
Returns the query string that is contained in the request URL after the path. This method returnsnullif the URL does not have a query string. Same as the value of the CGI variable QUERY_STRING.- Returns:
- a
Stringcontaining the query string ornullif the URL contains no query string. The value is not decoded by the container.
-
getHeader
String getHeader(String name)
Returns the value of the specified request header as aString. If the request did not include a header of the specified name, this method returnsnull. If there are multiple headers with the same name, this method returns the first head in the request. The header name is case insensitive. You can use this method with any request header.- Parameters:
name- aStringspecifying the header name- Returns:
- a
Stringcontaining the value of the requested header, ornullif the request does not have a header of that name
-
-