org.webmacro.servlet
Class CGI_Impersonator

java.lang.Object
  extended byorg.webmacro.servlet.CGI_Impersonator

public final class CGI_Impersonator
extends java.lang.Object

Provided to mimic the CGI environment within the WebMacro script language via introspection. The data in this class duplicates information already available in request, but makes it available in a familiar form.

From the WebMacro script language you can refer to the properties contained in this class with names that exactly duplicate the names familiar to CGI programmers. eg: REQUEST_METHOD, PATH_INFO, etc.


Method Summary
 java.lang.String getAUTH_TYPE()
          Type of authorization for this request
 java.lang.Integer getCONTENT_LENGTH()
          Get the content length submitted to this request
 java.lang.String getCONTENT_TYPE()
          Get the content type submitted to this request
 java.lang.String getDOCUMENT_ROOT()
          What is the root of documents served by this servlet WARNING: the method called (getRealPath) is deprecated in Servlet 2.2
 java.lang.String getHTTP_ACCEPT()
          What type of data is accepted by the client
 java.lang.String getHTTP_REFERER()
          Get the URL that the request claims to have visited prior to this one
 java.lang.String getHTTP_USER_AGENT()
          Get the user agent (browser) connected to this request
 java.lang.String getPATH_INFO()
          What portion of the URL appeared as additional path beyond the SCRIPT_NAME portion? Return that as a string.
 java.lang.String getPATH_TRANSLATED()
          Same as PATH_INFO but translated to a real path
 java.lang.String getQUERY_STRING()
          In a GET request, return the query string that was submitted, if any
 java.lang.String getREMOTE_ADDR()
          Return the remove address connected to this servlet
 java.lang.String getREMOTE_HOST()
          Return the remote host connected to this request
 java.lang.String getREMOTE_USER()
          Name of the remote user if it was supplied with the HTTP request
 java.lang.String getREQUEST_METHOD()
          Return what type of REQUEST this was: GET, POST, etc.
 java.lang.String getSCRIPT_NAME()
          What portion of the URL represented the servlet being run? Return that as a string.
 java.lang.String getSERVER_NAME()
          Return the name of the server
 java.lang.Integer getSERVER_PORT()
          Return the server port
 java.lang.String getSERVER_PROTOCOL()
          Return the server protocol
 java.lang.String getSERVER_SOFTWARE()
          Return the server info
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSERVER_NAME

public final java.lang.String getSERVER_NAME()
Return the name of the server


getSERVER_SOFTWARE

public final java.lang.String getSERVER_SOFTWARE()
Return the server info


getSERVER_PROTOCOL

public final java.lang.String getSERVER_PROTOCOL()
Return the server protocol


getSERVER_PORT

public final java.lang.Integer getSERVER_PORT()
Return the server port


getREQUEST_METHOD

public final java.lang.String getREQUEST_METHOD()
Return what type of REQUEST this was: GET, POST, etc.


getPATH_INFO

public final java.lang.String getPATH_INFO()
What portion of the URL appeared as additional path beyond the SCRIPT_NAME portion? Return that as a string.


getPATH_TRANSLATED

public final java.lang.String getPATH_TRANSLATED()
Same as PATH_INFO but translated to a real path


getSCRIPT_NAME

public final java.lang.String getSCRIPT_NAME()
What portion of the URL represented the servlet being run? Return that as a string.


getDOCUMENT_ROOT

public final java.lang.String getDOCUMENT_ROOT()
What is the root of documents served by this servlet WARNING: the method called (getRealPath) is deprecated in Servlet 2.2


getQUERY_STRING

public final java.lang.String getQUERY_STRING()
In a GET request, return the query string that was submitted, if any


getREMOTE_HOST

public final java.lang.String getREMOTE_HOST()
Return the remote host connected to this request


getREMOTE_ADDR

public final java.lang.String getREMOTE_ADDR()
Return the remove address connected to this servlet


getAUTH_TYPE

public final java.lang.String getAUTH_TYPE()
Type of authorization for this request


getREMOTE_USER

public final java.lang.String getREMOTE_USER()
Name of the remote user if it was supplied with the HTTP request


getCONTENT_TYPE

public final java.lang.String getCONTENT_TYPE()
Get the content type submitted to this request


getCONTENT_LENGTH

public final java.lang.Integer getCONTENT_LENGTH()
Get the content length submitted to this request


getHTTP_ACCEPT

public final java.lang.String getHTTP_ACCEPT()
What type of data is accepted by the client


getHTTP_USER_AGENT

public final java.lang.String getHTTP_USER_AGENT()
Get the user agent (browser) connected to this request


getHTTP_REFERER

public final java.lang.String getHTTP_REFERER()
Get the URL that the request claims to have visited prior to this one