Save This Page
Home » apache-tomcat-6.0.16-src » org.apache » catalina » util » [javadoc | source]
org.apache.catalina.util
public class: ProcessEnvironment [javadoc | source]
java.lang.Object
   org.apache.catalina.util.ProcessEnvironment

Direct Known Subclasses:
    CGIProcessEnvironment

Encapsulates the Process environment and rules to derive that environment from the servlet container and request information.
Field Summary
protected  String pathInfo    pathInfo for the current request 
protected  Hashtable env    derived process environment 
protected  String command    command to be invoked 
protected  boolean valid    whether or not this object is valid or not 
protected  int debug    the debugging detail level for this instance. 
protected  File workingDirectory    process' desired working directory 
Constructor:
 public ProcessEnvironment(HttpServletRequest req,
    ServletContext context) 
    Creates a ProcessEnvironment and derives the necessary environment, working directory, command, etc.
    Parameters:
    req - HttpServletRequest for information provided by the Servlet API
    context - ServletContext for information provided by the Servlet API
 public ProcessEnvironment(HttpServletRequest req,
    ServletContext context,
    int debug) 
    Creates a ProcessEnvironment and derives the necessary environment, working directory, command, etc.
    Parameters:
    req - HttpServletRequest for information provided by the Servlet API
    context - ServletContext for information provided by the Servlet API
    debug - int debug level (0 == none, 4 == medium, 6 == lots)
Method from org.apache.catalina.util.ProcessEnvironment Summary:
blanksToString,   deriveProcessEnvironment,   getCommand,   getContext,   getContextPath,   getEnvironment,   getServletPath,   getWebAppRootDir,   getWorkingDirectory,   isValid,   nullsToBlanks,   nullsToString,   setCommand,   setEnvironment,   setupFromContext,   setupFromRequest,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.util.ProcessEnvironment Detail:
 protected String blanksToString(String couldBeBlank,
    String subForBlanks) 
    Converts blank strings to another string
 protected boolean deriveProcessEnvironment(HttpServletRequest req) 
    Constructs the Process environment to be supplied to the invoked process. Defines an environment no environment variables.

    Should be overriden by subclasses to perform useful setup.

 public String getCommand() 
    Gets derived command string
 public ServletContext getContext() 
 public String getContextPath() 
 public Hashtable getEnvironment() 
    Gets process' environment
 public String getServletPath() 
 public String getWebAppRootDir() 
    Gets the root directory of the web application to which this process\ belongs
 public File getWorkingDirectory() 
    Gets this process' derived working directory
 public boolean isValid() 
    Gets validity status
 protected String nullsToBlanks(String s) 
    Converts null strings to blank strings ("")
 protected String nullsToString(String couldBeNull,
    String subForNulls) 
    Converts null strings to another string
 protected String setCommand(String command) 
    Sets the desired command string
 public Hashtable setEnvironment(Hashtable env) 
    Sets process' environment
 protected  void setupFromContext(ServletContext context) 
    Uses the ServletContext to set some process variables
 protected  void setupFromRequest(HttpServletRequest req) 
    Uses the HttpServletRequest to set most process variables
 public String toString() 
    Print important process environment information in an easy-to-read HTML table