| java.lang.Object org.apache.catalina.util.ProcessEnvironment
All known Subclasses: org.apache.catalina.util.CGIProcessEnvironment,
ProcessEnvironment | public class ProcessEnvironment (Code) | | Encapsulates the Process environment and rules to derive
that environment from the servlet container and request information.
author: Martin Dengler [root@martindengler.com] version: $Revision: 1.2 $, $Date: 2001/07/22 20:25:13 $ since: Tomcat 4.0 |
debug | protected int debug(Code) | | the debugging detail level for this instance.
|
pathInfo | protected String pathInfo(Code) | | pathInfo for the current request
|
valid | protected boolean valid(Code) | | whether or not this object is valid or not
|
workingDirectory | protected File workingDirectory(Code) | | process' desired working directory
|
ProcessEnvironment | public ProcessEnvironment(HttpServletRequest req, ServletContext context)(Code) | | Creates a ProcessEnvironment and derives the necessary environment,
working directory, command, etc.
Parameters: req - HttpServletRequest for information provided bythe Servlet API Parameters: context - ServletContext for information provided bythe Servlet API |
ProcessEnvironment | public ProcessEnvironment(HttpServletRequest req, ServletContext context, int debug)(Code) | | Creates a ProcessEnvironment and derives the necessary environment,
working directory, command, etc.
Parameters: req - HttpServletRequest for information provided bythe Servlet API Parameters: context - ServletContext for information provided bythe Servlet API Parameters: debug - int debug level (0 == none, 4 == medium, 6 == lots) |
blanksToString | protected String blanksToString(String couldBeBlank, String subForBlanks)(Code) | | Converts blank strings to another string
Parameters: string - to be converted if necessary Parameters: string - to return instead of a blank string a non-null string, either the original or the substitutestring if the original was null or empty ("") |
deriveProcessEnvironment | protected boolean deriveProcessEnvironment(HttpServletRequest req)(Code) | | 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.
Parameters: HttpServletRequest - request associated with theProcess' invocation true if environment was set OK, false if there was a problemand no environment was set |
getCommand | public String getCommand()(Code) | | Gets derived command string
command string |
getEnvironment | public Hashtable getEnvironment()(Code) | | Gets process' environment
process' environment |
getWebAppRootDir | public String getWebAppRootDir()(Code) | | Gets the root directory of the web application to which this process\
belongs
root directory |
getWorkingDirectory | public File getWorkingDirectory()(Code) | | Gets this process' derived working directory
working directory |
isValid | public boolean isValid()(Code) | | Gets validity status
true if this environment is valid, false otherwise |
nullsToBlanks | protected String nullsToBlanks(String s)(Code) | | Converts null strings to blank strings ("")
Parameters: string - to be converted if necessary a non-null string, either the original or the empty string("") if the original was null |
nullsToString | protected String nullsToString(String couldBeNull, String subForNulls)(Code) | | Converts null strings to another string
Parameters: string - to be converted if necessary Parameters: string - to return instead of a null string a non-null string, either the original or the substitutestring if the original was null |
setCommand | protected String setCommand(String command)(Code) | | Sets the desired command string
Parameters: String - command as desired command string |
setEnvironment | public Hashtable setEnvironment(Hashtable env)(Code) | | Sets process' environment
process' environment Hashtable to which the process' environment was set |
setupFromContext | protected void setupFromContext(ServletContext context)(Code) | | Uses the ServletContext to set some process variables
Parameters: context - ServletContext for information provided bythe Servlet API |
setupFromRequest | protected void setupFromRequest(HttpServletRequest req)(Code) | | Uses the HttpServletRequest to set most process variables
Parameters: req - HttpServletRequest for information provided bythe Servlet API |
toString | public String toString()(Code) | | Print important process environment information in an
easy-to-read HTML table
HTML string containing process environment info |
|
|