|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.catalina.util.ProcessEnvironment
Encapsulates the Process environment and rules to derive that environment from the servlet container and request information.
Field Summary | |
protected java.lang.String |
command
command to be invoked |
protected int |
debug
the debugging detail level for this instance. |
protected java.util.Hashtable |
env
derived process environment |
protected java.lang.String |
pathInfo
pathInfo for the current request |
protected boolean |
valid
whether or not this object is valid or not |
protected java.io.File |
workingDirectory
process' desired working directory |
Constructor Summary | |
ProcessEnvironment(javax.servlet.http.HttpServletRequest req,
javax.servlet.ServletContext context)
Creates a ProcessEnvironment and derives the necessary environment, working directory, command, etc. |
|
ProcessEnvironment(javax.servlet.http.HttpServletRequest req,
javax.servlet.ServletContext context,
int debug)
Creates a ProcessEnvironment and derives the necessary environment, working directory, command, etc. |
Method Summary | |
protected java.lang.String |
blanksToString(java.lang.String couldBeBlank,
java.lang.String subForBlanks)
Converts blank strings to another string |
protected boolean |
deriveProcessEnvironment(javax.servlet.http.HttpServletRequest req)
Constructs the Process environment to be supplied to the invoked process. |
java.lang.String |
getCommand()
Gets derived command string |
javax.servlet.ServletContext |
getContext()
|
java.lang.String |
getContextPath()
|
java.util.Hashtable |
getEnvironment()
Gets process' environment |
java.lang.String |
getServletPath()
|
java.lang.String |
getWebAppRootDir()
Gets the root directory of the web application to which this process\ belongs |
java.io.File |
getWorkingDirectory()
Gets this process' derived working directory |
boolean |
isValid()
Gets validity status |
protected void |
log(java.lang.String s)
|
protected java.lang.String |
nullsToBlanks(java.lang.String s)
Converts null strings to blank strings ("") |
protected java.lang.String |
nullsToString(java.lang.String couldBeNull,
java.lang.String subForNulls)
Converts null strings to another string |
protected java.lang.String |
setCommand(java.lang.String command)
Sets the desired command string |
java.util.Hashtable |
setEnvironment(java.util.Hashtable env)
Sets process' environment |
protected void |
setupFromContext(javax.servlet.ServletContext context)
Uses the ServletContext to set some process variables |
protected void |
setupFromRequest(javax.servlet.http.HttpServletRequest req)
Uses the HttpServletRequest to set most process variables |
java.lang.String |
toString()
Print important process environment information in an easy-to-read HTML table |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String pathInfo
protected java.util.Hashtable env
protected java.lang.String command
protected boolean valid
protected int debug
protected java.io.File workingDirectory
Constructor Detail |
public ProcessEnvironment(javax.servlet.http.HttpServletRequest req, javax.servlet.ServletContext context)
req
- HttpServletRequest for information provided by
the Servlet APIcontext
- ServletContext for information provided by
the Servlet APIpublic ProcessEnvironment(javax.servlet.http.HttpServletRequest req, javax.servlet.ServletContext context, int debug)
req
- HttpServletRequest for information provided by
the Servlet APIcontext
- ServletContext for information provided by
the Servlet APIdebug
- int debug level (0 == none, 4 == medium, 6 == lots)Method Detail |
protected void setupFromContext(javax.servlet.ServletContext context)
context
- ServletContext for information provided by
the Servlet APIprotected void setupFromRequest(javax.servlet.http.HttpServletRequest req)
req
- HttpServletRequest for information provided by
the Servlet APIpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getCommand()
protected java.lang.String setCommand(java.lang.String command)
public java.io.File getWorkingDirectory()
public java.util.Hashtable getEnvironment()
public java.util.Hashtable setEnvironment(java.util.Hashtable env)
public boolean isValid()
protected java.lang.String nullsToBlanks(java.lang.String s)
null
protected java.lang.String nullsToString(java.lang.String couldBeNull, java.lang.String subForNulls)
null
protected java.lang.String blanksToString(java.lang.String couldBeBlank, java.lang.String subForBlanks)
null
or empty ("")protected void log(java.lang.String s)
protected boolean deriveProcessEnvironment(javax.servlet.http.HttpServletRequest req)
Should be overriden by subclasses to perform useful setup.
public java.lang.String getWebAppRootDir()
public java.lang.String getContextPath()
public javax.servlet.ServletContext getContext()
public java.lang.String getServletPath()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |