Package org.zeroturnaround.javarebel
Interface RebelHttpServletRequest
public interface RebelHttpServletRequest
Http servlet request interface visible to JRebel agent.
Separate interface is required as the javax.servlet.http.HttpServletRequest
interface is not loaded by the boot class loader.
In practice a bytecode processor makes javax.servlet.http.HttpServletRequest
to extend the given interface.
-
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(String name) A access mirror for HttpServletRequest's methodReturns the value of the specified request header as aString.A access mirror for HttpServletRequest's methodReturns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT.A access mirror for HttpServletRequest's methodReturns the query string that is contained in the request URL after the path.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.Reconstructs the URL the client used to make the request.A access mirror for HttpServletRequest's method
-
Method Details
-
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.- 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
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
-
getHeaderNames
Enumeration<String> getHeaderNames()A access mirror for HttpServletRequest's method -
getAttribute
A access mirror for HttpServletRequest's method -
getServletPath
String getServletPath()A access mirror for HttpServletRequest's method -
getPathInfo
String getPathInfo()A access mirror for HttpServletRequest's method
-