org.apache.taglibs.request
Class RequestData

java.lang.Object
  extended by org.apache.taglibs.request.RequestData

public class RequestData
extends java.lang.Object

Stores the scripting variable data provided by the JSP Tag request, used to access HttpServletRequest information using the standard JSP <jsp:getProperty> tag.

The script variable of name id is available for use during processing of the remainder of the JSP page.

Author:
Glenn Nielsen
See Also:
RequestTag

Method Summary
 java.lang.String getAuthType()
          Returns the name of the authentication scheme used to protect the servlet.
 java.lang.String getCharacterEncoding()
          Returns the name of the character encoding used in the body of this request.
 java.lang.String getContentLength()
          Returns the length, in bytes, of the request body and made available by the input stream, or -1 if the length is not known.
 java.lang.String getContentType()
          Returns the MIME type of the body of the request, or null if the type is not known.
 java.lang.String getContextPath()
          Returns the portion of the request URI that indicates the context of the request.
 java.lang.String getMethod()
          Returns the name of the HTTP method with which this request was made.
 java.lang.String getPathInfo()
          Returns any extra path information associated with the URL the client sent when it made this request.
 java.lang.String getPathTranslated()
          Returns any extra path information after the servlet name but before the query string, and translates it to a real path.
 java.lang.String getProtocol()
          Returns the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1.
 java.lang.String getQueryString()
          Returns the query string that is contained in the request URL after the path.
 java.lang.String getRemoteAddr()
          Returns the Internet Protocol (IP) address of the client that sent the request.
 java.lang.String getRemoteHost()
          Returns the fully qualified name of the client that sent the request, or the IP address of the client if the name cannot be determined.
 java.lang.String getRemoteUser()
          Returns the login of the user making this request, if the user has been authenticated, or "" if the user has not been authenticated.
 java.lang.String getRequestedSessionId()
          Returns the session ID specified by the client.
 java.lang.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.
 java.lang.String getRequestURL()
          Returns the request URL up to the query string in the first line of the HTTP request.
 java.lang.String getScheme()
          Returns the name of the scheme used to make this request, for example, http, https, or ftp.
 java.lang.String getServerName()
          Returns the host name of the server that received the request.
 java.lang.String getServerPort()
          Returns the port number on which this request was received.
 java.lang.String getServletPath()
          Returns the part of this request's URL that calls the servlet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAuthType

public final java.lang.String getAuthType()
Returns the name of the authentication scheme used to protect the servlet.

<jsp:getProperty name="id" property="authType"/>

Returns:
String - "BASIC", "SSL," or "" if the servlet was not protected.

getContextPath

public final java.lang.String getContextPath()
Returns the portion of the request URI that indicates the context of the request.

<jsp:getProperty name="id" property="contextPath"/>

Returns:
String - request URI context path

getMethod

public final java.lang.String getMethod()
Returns the name of the HTTP method with which this request was made.

<jsp:getProperty name="id" property="method"/>

Returns:
String - "GET", "POST", or "PUT".

getPathInfo

public final java.lang.String getPathInfo()
Returns any extra path information associated with the URL the client sent when it made this request.

<jsp:getProperty name="id" property="pathInfo"/>

Returns:
String - path info portion of the request URL

getPathTranslated

public final java.lang.String getPathTranslated()
Returns any extra path information after the servlet name but before the query string, and translates it to a real path.

<jsp:getProperty name="id" property="pathTranslated"/>

Returns:
String - translated path information

getQueryString

public final java.lang.String getQueryString()
Returns the query string that is contained in the request URL after the path.

<jsp:getProperty name="id" property="queryString"/>

Returns:
String - query string from the URL

getRemoteUser

public final java.lang.String getRemoteUser()
Returns the login of the user making this request, if the user has been authenticated, or "" if the user has not been authenticated.

<jsp:getProperty name="id" property="remoteUser"/>

Returns:
String - remote user name or "" String

getRequestedSessionId

public final java.lang.String getRequestedSessionId()
Returns the session ID specified by the client.

<jsp:getProperty name="id" property="requestedSessionId"/>

Returns:
String - session ID

getRequestURI

public final java.lang.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.

<jsp:getProperty name="id" property="requestURI"/>

Returns:
String - request URI

getRequestURL

public final java.lang.String getRequestURL()
Returns the request URL up to the query string in the first line of the HTTP request.

<jsp:getProperty name="id" property="requestURL"/>

Returns:
String - request URL

getServletPath

public final java.lang.String getServletPath()
Returns the part of this request's URL that calls the servlet.

<jsp:getProperty name="id" property="servletPath"/>

Returns:
String - servlet path

getCharacterEncoding

public final java.lang.String getCharacterEncoding()
Returns the name of the character encoding used in the body of this request.

<jsp:getProperty name="id" property="characterEncoding"/>

Returns:
String - character encoding

getContentLength

public final java.lang.String getContentLength()
Returns the length, in bytes, of the request body and made available by the input stream, or -1 if the length is not known.

<jsp:getProperty name="id" property="contentLength"/>

Returns:
String - content length or "-1"

getContentType

public final java.lang.String getContentType()
Returns the MIME type of the body of the request, or null if the type is not known.

<jsp:getProperty name="id" property="contentType"/>

Returns:
String - content type

getProtocol

public final java.lang.String getProtocol()
Returns the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1.

<jsp:getProperty name="id" property="protocol"/>

Returns:
String - protocol of the request

getRemoteAddr

public final java.lang.String getRemoteAddr()
Returns the Internet Protocol (IP) address of the client that sent the request.

<jsp:getProperty name="id" property="remoteAddr"/>

Returns:
String - remote IP address

getRemoteHost

public final java.lang.String getRemoteHost()
Returns the fully qualified name of the client that sent the request, or the IP address of the client if the name cannot be determined.

<jsp:getProperty name="id" property="remoteHost"/>

Returns:
String - remote host

getScheme

public final java.lang.String getScheme()
Returns the name of the scheme used to make this request, for example, http, https, or ftp.

<jsp:getProperty name="id" property="scheme"/>

Returns:
String - scheme used to make the request

getServerName

public final java.lang.String getServerName()
Returns the host name of the server that received the request.

<jsp:getProperty name="id" property="serverName"/>

Returns:
String - host name of the server

getServerPort

public final java.lang.String getServerPort()
Returns the port number on which this request was received.

<jsp:getProperty name="id" property="serverPort"/>

Returns:
String - server port number


Copyright ? 2000-2004 The Apache Software Foundation. All Rights Reserved.