Java Doc for CGIProcessEnvironment.java in  » Sevlet-Container » tomcat-catalina » org » apache » catalina » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » tomcat catalina » org.apache.catalina.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.catalina.util.ProcessEnvironment
      org.apache.catalina.util.CGIProcessEnvironment

CGIProcessEnvironment
public class CGIProcessEnvironment extends ProcessEnvironment (Code)
Encapsulates the CGI Process' environment and rules to derive that environment from the servlet container and request information.
author:
   Martin Dengler [root@martindengler.com]
version:
   $Revision: 1.4 $, $Date: 2004/05/26 16:20:54 $
since:
   Tomcat 4.0



Constructor Summary
public  CGIProcessEnvironment(HttpServletRequest req, ServletContext context)
     Creates a ProcessEnvironment and derives the necessary environment, working directory, command, etc.
public  CGIProcessEnvironment(HttpServletRequest req, ServletContext context, String cgiPathPrefix)
     Creates a ProcessEnvironment and derives the necessary environment, working directory, command, etc.
public  CGIProcessEnvironment(HttpServletRequest req, ServletContext context, int debug)
     Creates a ProcessEnvironment and derives the necessary environment, working directory, command, etc.
public  CGIProcessEnvironment(HttpServletRequest req, ServletContext context, String cgiPathPrefix, int debug)
     Creates a ProcessEnvironment and derives the necessary environment, working directory, command, etc.

Method Summary
protected  booleanderiveProcessEnvironment(HttpServletRequest req)
    
protected  String[]findCGI(String pathInfo, String webAppRootDir, String contextPath, String servletPath, String cgiPathPrefix)
     Resolves core information about the cgi script.
public  HashtablegetParameters()
    
public  StringtoString()
    


Constructor Detail
CGIProcessEnvironment
public CGIProcessEnvironment(HttpServletRequest req, ServletContext context)(Code)
Creates a ProcessEnvironment and derives the necessary environment, working directory, command, etc. The cgi path prefix is initialized to "" (the empty string).
Parameters:
  req - HttpServletRequest for information provided bythe Servlet API
Parameters:
  context - ServletContext for information provided bythe Servlet API



CGIProcessEnvironment
public CGIProcessEnvironment(HttpServletRequest req, ServletContext context, String cgiPathPrefix)(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:
  cgiPathPrefix - subdirectory of webAppRootDir below which theweb app's CGIs may be stored; can be null or "".



CGIProcessEnvironment
public CGIProcessEnvironment(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, 6 == lots)



CGIProcessEnvironment
public CGIProcessEnvironment(HttpServletRequest req, ServletContext context, String cgiPathPrefix, 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:
  cgiPathPrefix - subdirectory of webAppRootDir below which theweb app's CGIs may be stored; can be null or "".
Parameters:
  debug - int debug level (0 == none, 6 == lots)




Method Detail
deriveProcessEnvironment
protected boolean deriveProcessEnvironment(HttpServletRequest req)(Code)
Constructs the CGI environment to be supplied to the invoked CGI script; relies heavliy on Servlet API methods and findCGI
Parameters:
  req - request associated with the CGI invokation true if environment was set OK, false if there was a problemand no environment was set



findCGI
protected String[] findCGI(String pathInfo, String webAppRootDir, String contextPath, String servletPath, String cgiPathPrefix)(Code)
Resolves core information about the cgi script.

Example URI:

 /servlet/cgigateway/dir1/realCGIscript/pathinfo1 
  • path = $CATALINA_HOME/mywebapp/dir1/realCGIscript
  • scriptName = /servlet/cgigateway/dir1/realCGIscript
  • cgiName = /dir1/realCGIscript
  • name = realCGIscript

CGI search algorithm: search the real path below <my-webapp-root> and find the first non-directory in the getPathTranslated("/"), reading/searching from left-to-right.

The CGI search path will start at webAppRootDir + File.separator + cgiPathPrefix (or webAppRootDir alone if cgiPathPrefix is null).

cgiPathPrefix is usually set by the calling servlet to the servlet's cgiPathPrefix init parameter


Parameters:
  pathInfo - String from HttpServletRequest.getPathInfo()
Parameters:
  webAppRootDir - String from context.getRealPath("/")
Parameters:
  contextPath - String as from HttpServletRequest.getContextPath()
Parameters:
  servletPath - String as from HttpServletRequest.getServletPath()
Parameters:
  cgiPathPrefix - subdirectory of webAppRootDir below which theweb app's CGIs may be stored; can be null.
  • path - full file-system path to valid cgiscript, or null if no cgi was found
  • scriptName - CGI variable SCRIPT_NAME; the fullURL path to valid cgi script ornull if no cgi was found
  • cgiName - servlet pathInfo fragmentcorresponding to the cgi scriptitself, or null if not found
  • name - simple name (no directories) ofthe cgi script, or null if no cgiwas found

author:
   Martin Dengler [root@martindengler.com]
since:
   Tomcat 4.0



getParameters
public Hashtable getParameters()(Code)
Gets process' derived query parameters process' query parameters



toString
public String toString()(Code)
Print important CGI environment information in an easy-to-read HTML table HTML string containing CGI environment info



Fields inherited from org.apache.catalina.util.ProcessEnvironment
protected String command(Code)(Java Doc)
protected int debug(Code)(Java Doc)
protected Hashtable env(Code)(Java Doc)
protected String pathInfo(Code)(Java Doc)
protected boolean valid(Code)(Java Doc)
protected File workingDirectory(Code)(Java Doc)

Methods inherited from org.apache.catalina.util.ProcessEnvironment
protected String blanksToString(String couldBeBlank, String subForBlanks)(Code)(Java Doc)
protected boolean deriveProcessEnvironment(HttpServletRequest req)(Code)(Java Doc)
public String getCommand()(Code)(Java Doc)
public ServletContext getContext()(Code)(Java Doc)
public String getContextPath()(Code)(Java Doc)
public Hashtable getEnvironment()(Code)(Java Doc)
public String getServletPath()(Code)(Java Doc)
public String getWebAppRootDir()(Code)(Java Doc)
public File getWorkingDirectory()(Code)(Java Doc)
public boolean isValid()(Code)(Java Doc)
protected void log(String s)(Code)(Java Doc)
protected String nullsToBlanks(String s)(Code)(Java Doc)
protected String nullsToString(String couldBeNull, String subForNulls)(Code)(Java Doc)
protected String setCommand(String command)(Code)(Java Doc)
public Hashtable setEnvironment(Hashtable env)(Code)(Java Doc)
protected void setupFromContext(ServletContext context)(Code)(Java Doc)
protected void setupFromRequest(HttpServletRequest req)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.