| java.lang.Object de.webman.template.jsp.WebManRequest
WebManRequest | public class WebManRequest implements HttpServletRequest(Code) | | Implementierung des HttpRequest fuer die Abarbeitung der jsp Templates
author: $Author: alex $ version: $Revision: 1.5 $ |
Method Summary | |
public Object | getAttribute(String name) Returns the value of the named attribute of the request, or
null if the attribute does not exist. | public java.util.Enumeration | getAttributeNames() | public String | getAuthType() Gets the authentication scheme of this request. | public String | getCharacterEncoding() Returns the character set encoding for the input of this request. | public int | getContentLength() Returns the size of the request entity data, or -1 if not known. | public String | getContentType() Returns the Internet Media Type of the request entity data, or
null if not known. | public java.lang.String | getContextPath() | public Cookie[] | getCookies() Gets the array of cookies found in this request. | public long | getDateHeader(String name) Gets the value of the requested date header field of this
request. | public String | getHeader(String name) Gets the value of the requested header field of this request. | public Enumeration | getHeaderNames() Gets the header names for this request.
an enumeration of strings representing the header namesfor this request. | public java.util.Enumeration | getHeaders(java.lang.String name) | public ServletInputStream | getInputStream() Returns an input stream for reading binary data in the request body. | public int | getIntHeader(String name) Gets the value of the specified integer header field of this
request. | public java.util.Locale | getLocale() | public java.util.Enumeration | getLocales() | public String | getMethod() Gets the HTTP method (for example, GET, POST, PUT) with which
this request was made. | public String | getParameter(String name) Returns a string containing the lone value of the specified
parameter, or null if the parameter does not exist. | public java.util.Map | getParameterMap() 2.3
Returns a java.util.Map of the parameters of this request. | public Enumeration | getParameterNames() Returns the parameter names for this request as an enumeration
of strings, or an empty enumeration if there are no parameters
or the input stream is empty. | public String[] | getParameterValues(String name) Returns the values of the specified parameter for the request as
an array of strings, or null if the named parameter does not
exist. | public String | getPathInfo() Gets any optional extra path information following the servlet
path of this request's URI, but immediately preceding its query
string. | public String | getPathTranslated() Gets any optional extra path information following the servlet
path of this request's URI, but immediately preceding its query
string, and translates it to a real path. | public String | getProtocol() Returns the protocol and version of the request as a string of
the form <protocol>/<major version>.<minor
version> . | public String | getQueryString() Gets any query string that is part of the HTTP request URI. | public BufferedReader | getReader() Returns a buffered reader for reading text in the request body.
This translates character set encodings as appropriate. | public String | getRealPath(String path) Applies alias rules to the specified virtual path and returns
the corresponding real path, or null if the translation can not
be performed for any reason. | public String | getRemoteAddr() Returns the IP address of the agent that sent the request. | public String | getRemoteHost() Returns the fully qualified host name of the agent that sent the
request. | public String | getRemoteUser() Gets the name of the user making this request. | public RequestDispatcher | getRequestDispatcher(java.lang.String path) | public String | getRequestURI() Gets, from the first line of the HTTP request, the part of this
request's URI that is to the left of any query string. | public java.lang.StringBuffer | getRequestURL() 2.3
Reconstructs the URL the client used to make the request. | public String | getRequestedSessionId() Gets the session id specified with this request. | public String | getScheme() Returns the scheme of the URL used in this request, for example
"http", "https", or "ftp". | public String | getServerName() Returns the host name of the server that received the request. | public int | getServerPort() Returns the port number on which this request was received. | public String | getServletPath() Gets the part of this request's URI that refers to the servlet
being invoked. | public HttpSession | getSession(boolean create) Gets the current valid session associated with this request, if
create is false or, if necessary, creates a new session for the
request, if create is true. | public HttpSession | getSession() | public java.security.Principal | getUserPrincipal() | public boolean | isRequestedSessionIdFromCookie() Checks whether the session id specified by this request came in
as a cookie. | public boolean | isRequestedSessionIdFromURL() | public boolean | isRequestedSessionIdFromUrl() Checks whether the session id specified by this request came in
as part of the URL. | public boolean | isRequestedSessionIdValid() Checks whether this request is associated with a session that
is valid in the current session context. | public boolean | isSecure() | public boolean | isUserInRole(java.lang.String role) | public void | removeAttribute(java.lang.String name) | public void | setAttribute(java.lang.String name, java.lang.Object o) | public void | setCharacterEncoding(java.lang.String env) 2.3
Overrides the name of the character encoding used in the body of this request. | public void | setData(Object data) | public void | setOriginalRequest(HttpServletRequest _originalRequest) |
getAttribute | public Object getAttribute(String name)(Code) | | Returns the value of the named attribute of the request, or
null if the attribute does not exist. This method allows
access to request information not already provided by the other
methods in this interface. Attribute names should follow the
same convention as package names.
Parameters: name - the name of the attribute whose value is required |
getAuthType | public String getAuthType()(Code) | | Gets the authentication scheme of this request. Same as the CGI
variable AUTH_TYPE.
this request's authentication scheme, or null if none. |
getCharacterEncoding | public String getCharacterEncoding()(Code) | | Returns the character set encoding for the input of this request.
|
getContentLength | public int getContentLength()(Code) | | Returns the size of the request entity data, or -1 if not known.
Same as the CGI variable CONTENT_LENGTH.
|
getContentType | public String getContentType()(Code) | | Returns the Internet Media Type of the request entity data, or
null if not known. Same as the CGI variable CONTENT_TYPE.
|
getCookies | public Cookie[] getCookies()(Code) | | Gets the array of cookies found in this request.
the array of cookies found in this request |
getDateHeader | public long getDateHeader(String name)(Code) | | Gets the value of the requested date header field of this
request. If the header can't be converted to a date, the method
throws an IllegalArgumentException. The case of the header
field name is ignored.
Parameters: name - the String containing the name of the requestedheader field the value the requested date header field, or -1 if notfound. |
getHeader | public String getHeader(String name)(Code) | | Gets the value of the requested header field of this request.
The case of the header field name is ignored.
Parameters: name - the String containing the name of the requestedheader field the value of the requested header field, or null if notknown. |
getHeaderNames | public Enumeration getHeaderNames()(Code) | | Gets the header names for this request.
an enumeration of strings representing the header namesfor this request. Some server implementations do not allowheaders to be accessed in this way, in which case this methodwill return null. |
getIntHeader | public int getIntHeader(String name)(Code) | | Gets the value of the specified integer header field of this
request. The case of the header field name is ignored. If the
header can't be converted to an integer, the method throws a
NumberFormatException.
Parameters: name - the String containing the name of the requestedheader field the value of the requested header field, or -1 if notfound. |
getMethod | public String getMethod()(Code) | | Gets the HTTP method (for example, GET, POST, PUT) with which
this request was made. Same as the CGI variable REQUEST_METHOD.
the HTTP method with which this request was made |
getParameter | public String getParameter(String name)(Code) | | Returns a string containing the lone value of the specified
parameter, or null if the parameter does not exist. For example,
in an HTTP servlet this method would return the value of the
specified query string parameter. Servlet writers should use
this method only when they are sure that there is only one value
for the parameter. If the parameter has (or could have)
multiple values, servlet writers should use
getParameterValues. If a multiple valued parameter name is
passed as an argument, the return value is implementation
dependent.
See Also: WebManRequest.getParameterValues Parameters: name - the name of the parameter whose value is required. |
getParameterMap | public java.util.Map getParameterMap()(Code) | | 2.3
Returns a java.util.Map of the parameters of this request.
Request parameters are extra information sent with the request.
For HTTP servlets, parameters are contained in the query string or posted form data.
|
getParameterNames | public Enumeration getParameterNames()(Code) | | Returns the parameter names for this request as an enumeration
of strings, or an empty enumeration if there are no parameters
or the input stream is empty. The input stream would be empty
if all the data had been read from the stream returned by the
method getInputStream.
|
getParameterValues | public String[] getParameterValues(String name)(Code) | | Returns the values of the specified parameter for the request as
an array of strings, or null if the named parameter does not
exist. For example, in an HTTP servlet this method would return
the values of the specified query string or posted form as an
array of strings.
Parameters: name - the name of the parameter whose value is required. See Also: javax.servlet.ServletRequest.getParameter |
getPathInfo | public String getPathInfo()(Code) | | Gets any optional extra path information following the servlet
path of this request's URI, but immediately preceding its query
string. Same as the CGI variable PATH_INFO.
the optional path information following the servletpath, but before the query string, in this request's URI; nullif this request's URI contains no extra path information |
getPathTranslated | public String getPathTranslated()(Code) | | Gets any optional extra path information following the servlet
path of this request's URI, but immediately preceding its query
string, and translates it to a real path. Similar to the CGI
variable PATH_TRANSLATED
extra path information translated to a real path or nullif no extra path information is in the request's URI |
getProtocol | public String getProtocol()(Code) | | Returns the protocol and version of the request as a string of
the form <protocol>/<major version>.<minor
version> . Same as the CGI variable SERVER_PROTOCOL.
|
getQueryString | public String getQueryString()(Code) | | Gets any query string that is part of the HTTP request URI.
Same as the CGI variable QUERY_STRING.
query string that is part of this request's URI, or nullif it contains no query string |
getReader | public BufferedReader getReader() throws IOException(Code) | | Returns a buffered reader for reading text in the request body.
This translates character set encodings as appropriate.
See Also: getInputStream exception: UnsupportedEncodingException - if the character set encodingis unsupported, so the text can't be correctly decoded. exception: IllegalStateException - if getInputStream has beencalled on this same request. exception: IOException - on other I/O related errors. |
getRealPath | public String getRealPath(String path)(Code) | | Applies alias rules to the specified virtual path and returns
the corresponding real path, or null if the translation can not
be performed for any reason. For example, an HTTP servlet would
resolve the path using the virtual docroot, if virtual hosting
is enabled, and with the default docroot otherwise. Calling
this method with the string "/" as an argument returns the
document root.
Parameters: path - the virtual path to be translated to a real path |
getRemoteAddr | public String getRemoteAddr()(Code) | | Returns the IP address of the agent that sent the request.
Same as the CGI variable REMOTE_ADDR.
|
getRemoteHost | public String getRemoteHost()(Code) | | Returns the fully qualified host name of the agent that sent the
request. Same as the CGI variable REMOTE_HOST.
|
getRemoteUser | public String getRemoteUser()(Code) | | Gets the name of the user making this request. The user name is
set with HTTP authentication. Whether the user name will
continue to be sent with each subsequent communication is
browser-dependent. Same as the CGI variable REMOTE_USER.
the name of the user making this request, or null if notknown. |
getRequestURI | public String getRequestURI()(Code) | | Gets, from the first line of the HTTP request, the part of this
request's URI that is to the left of any query string.
this request's URI |
getRequestURL | public java.lang.StringBuffer getRequestURL()(Code) | | 2.3
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.
|
getRequestedSessionId | public String getRequestedSessionId()(Code) | | Gets the session id specified with this request. This may
differ from the actual session id. For example, if the request
specified an id for an invalid session, then this will get a new
session with a new id.
the session id specified by this request, or null if therequest did not specify a session id See Also: WebManRequest.isRequestedSessionIdValid See Also: |
getScheme | public String getScheme()(Code) | | Returns the scheme of the URL used in this request, for example
"http", "https", or "ftp". Different schemes have different
rules for constructing URLs, as noted in RFC 1738. The URL used
to create a request may be reconstructed using this scheme, the
server name and port, and additional information such as URIs.
|
getServerName | public String getServerName()(Code) | | Returns the host name of the server that received the request.
Same as the CGI variable SERVER_NAME.
|
getServerPort | public int getServerPort()(Code) | | Returns the port number on which this request was received.
Same as the CGI variable SERVER_PORT.
|
getServletPath | public String getServletPath()(Code) | | Gets the part of this request's URI that refers to the servlet
being invoked. Analogous to the CGI variable SCRIPT_NAME.
the servlet being invoked, as contained in thisrequest's URI |
getSession | public HttpSession getSession(boolean create)(Code) | | Gets the current valid session associated with this request, if
create is false or, if necessary, creates a new session for the
request, if create is true.
the session associated with this request or null ifcreate was false and no valid session is associatedwith this request. |
isRequestedSessionIdFromCookie | public boolean isRequestedSessionIdFromCookie()(Code) | | Checks whether the session id specified by this request came in
as a cookie. (The requested session may not be one returned by
the getSession method.)
true if the session id specified by this request came inas a cookie; false otherwise See Also: WebManRequest.getSession |
isRequestedSessionIdFromURL | public boolean isRequestedSessionIdFromURL()(Code) | | |
isRequestedSessionIdFromUrl | public boolean isRequestedSessionIdFromUrl()(Code) | | Checks whether the session id specified by this request came in
as part of the URL. (The requested session may not be the one
returned by the getSession method.)
true if the session id specified by the request for thissession came in as part of the URL; false otherwise See Also: WebManRequest.getSession |
isSecure | public boolean isSecure()(Code) | | |
setCharacterEncoding | public void setCharacterEncoding(java.lang.String env) throws java.io.UnsupportedEncodingException(Code) | | 2.3
Overrides the name of the character encoding used in the body of this request.
This method must be called prior to reading request parameters or reading input using getReader()
|
|
|