cvs commit: jakarta-tomcat-catalina/webapps/docs cgi-howto.xml
markt 2005/05/23 15:36:00 Modified:webapps/docs cgi-howto.xml Log: Fix typo in CGI doc. Revision ChangesPath 1.7 +1 -1 jakarta-tomcat-catalina/webapps/docs/cgi-howto.xml Index: cgi-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/cgi-howto.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- cgi-howto.xml 17 Aug 2004 21:54:21 - 1.6 +++ cgi-howto.xml 23 May 2005 22:36:00 - 1.7 @@ -55,7 +55,7 @@ ul listrongcgiPathPrefix/strong - The CGI search path will start at the web application root directory + File.separator + this prefix. -The default cgiPathPrefix is code/WEB-INF/cgi/code/li +The default cgiPathPrefix is codeWEB-INF/cgi/code/li listrongdebug/strong - Debugging detail level for messages logged by this servlet. Default 0./li listrongexecutable/strong - The of the executable to be used to - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs cgi-howto.xml
markt 2004/09/28 15:19:33 Modified:catalina/src/conf Tag: TOMCAT_5_0 web.xml catalina/src/share/org/apache/catalina/servlets Tag: TOMCAT_5_0 CGIServlet.java webapps/docs Tag: TOMCAT_5_0 cgi-howto.xml Log: Revert RFE 27090 as it introduced a JDK 1.4 dependency. Remove unused timeout parameter Revision ChangesPath No revision No revision 1.39.2.2 +0 -12 jakarta-tomcat-catalina/catalina/src/conf/web.xml Index: web.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/conf/web.xml,v retrieving revision 1.39.2.1 retrieving revision 1.39.2.2 diff -u -r1.39.2.1 -r1.39.2.2 --- web.xml 24 Aug 2004 23:14:51 - 1.39.2.1 +++ web.xml 28 Sep 2004 22:19:32 - 1.39.2.2 @@ -262,20 +262,12 @@ !-- webAppRootDir + File.separator + this prefix. -- !-- [WEB-INF/cgi] -- !-- -- - !-- clientInputTimeout The time (in milliseconds) to wait for input -- - !-- from the browser before assuming that there-- - !-- is none. [100]-- - !-- -- !-- debug Debugging detail level for messages logged -- !-- by this servlet. [0] -- !-- -- !-- executable Name of the exectuable used to run the script. -- !-- [perl] -- !-- -- - !-- parameterEncoding Name of parameter encoding to be used with CGI -- - !-- servlet. -- - !-- [System.getProperty(file.encoding,UTF-8)] -- - !-- -- !-- IMPORTANT: To use the CGI servlet, you also need to rename the -- !--$CATALINA_HOME/server/lib/servlets-cgi.renametojar file -- !--to $CATALINA_HOME/server/lib/servlets-cgi.jar -- @@ -284,10 +276,6 @@ servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class -init-param - param-nameclientInputTimeout/param-name - param-value100/param-value -/init-param init-param param-namedebug/param-name param-value6/param-value No revision No revision 1.22.2.1 +6 -17 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Index: CGIServlet.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java,v retrieving revision 1.22 retrieving revision 1.22.2.1 diff -u -r1.22 -r1.22.2.1 --- CGIServlet.java 16 Jun 2004 18:22:20 - 1.22 +++ CGIServlet.java 28 Sep 2004 22:19:32 - 1.22.2.1 @@ -259,9 +259,6 @@ /** the debugging detail level for this servlet. */ private int debug = 0; -/** the time in ms to wait for the client to send us CGI input data */ -private int iClientInputTimeout = 100; - /** * The CGI search path will start at *webAppRootDir + File.separator + cgiPathPrefix @@ -273,10 +270,6 @@ /** the command to use with the script */ private String cgiExecutable = perl; -/** the encoding to use for parameters */ -private String parameterEncoding = System.getProperty(file.encoding, - UTF-8); - /** object used to ensure multiple threads don't try to expand same file */ static Object expandFileLock = new Object(); @@ -314,9 +307,6 @@ debug = Integer.parseInt(value); cgiPathPrefix = getServletConfig().getInitParameter(cgiPathPrefix); -value = -getServletConfig().getInitParameter(iClientInputTimeout); -iClientInputTimeout = Integer.parseInt(value); } catch (Throwable t) { //NOOP } @@ -728,8 +718,7 @@ if (param != null) { String values[] = req.getParameterValues(param); for (int i=0; i values.length; i++) { -
cvs commit: jakarta-tomcat-catalina/webapps/docs cgi-howto.xml
markt 2004/08/17 14:54:21 Modified:catalina/src/conf web.xml catalina/src/share/org/apache/catalina/servlets CGIServlet.java webapps/docs cgi-howto.xml Log: Fix bug 18273. Add support for optionally passing the shell environment variables to the CGI script. - Based heavily on a href=http://www.rgagnon.com/javadetails/java-0150.html; Read environment variables from an application/a by Real Gagnon - Ported from TC4 Revision ChangesPath 1.41 +13 -10jakarta-tomcat-catalina/catalina/src/conf/web.xml Index: web.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/conf/web.xml,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- web.xml 16 Aug 2004 22:26:49 - 1.40 +++ web.xml 17 Aug 2004 21:54:20 - 1.41 @@ -258,19 +258,22 @@ !-- supports the following initialization parameters (default values -- !-- are in square brackets): -- !-- -- - !-- cgiPathPrefix The CGI search path will start at -- - !-- webAppRootDir + File.separator + this prefix. -- - !-- [WEB-INF/cgi] -- + !-- cgiPathPrefixThe CGI search path will start at -- + !--webAppRootDir + File.separator + this prefix. -- + !--[WEB-INF/cgi] -- !-- -- - !-- debug Debugging detail level for messages logged -- - !-- by this servlet. [0] -- + !-- debugDebugging detail level for messages logged-- + !--by this servlet. [0] -- !-- -- - !-- executable Name of the exectuable used to run the script. -- - !-- [perl] -- + !-- executable Name of the exectuable used to run the-- + !--script. [perl]-- !-- -- - !-- parameterEncoding Name of parameter encoding to be used with CGI -- - !-- servlet. -- - !-- [System.getProperty(file.encoding,UTF-8)] -- + !-- parameterEncodingName of parameter encoding to be used with-- + !--CGI servlet. -- + !--[System.getProperty(file.encoding,UTF-8)] -- + !-- -- + !-- passShellEnvironment Should the shell environment variables (if-- + !--any) be passed to the CGI script? [false] -- !-- -- !-- IMPORTANT: To use the CGI servlet, you also need to rename the -- !--$CATALINA_HOME/server/lib/servlets-cgi.renametojar file -- 1.24 +75 -9 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Index: CGIServlet.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- CGIServlet.java 16 Aug 2004 22:26:50 - 1.23 +++ CGIServlet.java 17 Aug 2004 21:54:20 - 1.24 @@ -244,7 +244,6 @@ public final class CGIServlet extends HttpServlet { - /* some vars below copied from Craig R. McClanahan's InvokerServlet */ /** the Context container associated with our web application. */ @@ -261,7 +260,7 @@ */ private String cgiPathPrefix = null; -/** the command to use with the script */ +/** the executable to use with the script */ private String cgiExecutable = perl; /** the encoding to use for parameters */ @@ -271,6 +270,9 @@ /** object used to ensure multiple threads don't try to expand same file */ static Object expandFileLock = new Object(); +/** the shell environment variables to be passed to the CGI script */ +static Hashtable shellEnv = new Hashtable(); + /** * Sets instance variables. * P @@ -298,6 +300,8 @@
cvs commit: jakarta-tomcat-catalina/webapps/docs cgi-howto.xml
markt 2004/08/16 15:26:50 Modified:catalina/src/conf web.xml catalina/src/share/org/apache/catalina/servlets CGIServlet.java webapps/docs cgi-howto.xml Log: Revision ChangesPath 1.40 +0 -8 jakarta-tomcat-catalina/catalina/src/conf/web.xml Index: web.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/conf/web.xml,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- web.xml 20 Apr 2004 22:22:04 - 1.39 +++ web.xml 16 Aug 2004 22:26:49 - 1.40 @@ -262,10 +262,6 @@ !-- webAppRootDir + File.separator + this prefix. -- !-- [WEB-INF/cgi] -- !-- -- - !-- clientInputTimeout The time (in milliseconds) to wait for input -- - !-- from the browser before assuming that there-- - !-- is none. [100]-- - !-- -- !-- debug Debugging detail level for messages logged -- !-- by this servlet. [0] -- !-- -- @@ -284,10 +280,6 @@ servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class -init-param - param-nameclientInputTimeout/param-name - param-value100/param-value -/init-param init-param param-namedebug/param-name param-value6/param-value 1.23 +5 -23 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Index: CGIServlet.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- CGIServlet.java 16 Jun 2004 18:22:20 - 1.22 +++ CGIServlet.java 16 Aug 2004 22:26:50 - 1.23 @@ -247,21 +247,12 @@ /* some vars below copied from Craig R. McClanahan's InvokerServlet */ -/** the string manager for this package. */ -/* YAGNI -private static StringManager sm = -StringManager.getManager(Constants.Package); -*/ - /** the Context container associated with our web application. */ private ServletContext context = null; /** the debugging detail level for this servlet. */ private int debug = 0; -/** the time in ms to wait for the client to send us CGI input data */ -private int iClientInputTimeout = 100; - /** * The CGI search path will start at *webAppRootDir + File.separator + cgiPathPrefix @@ -314,9 +305,6 @@ debug = Integer.parseInt(value); cgiPathPrefix = getServletConfig().getInitParameter(cgiPathPrefix); -value = -getServletConfig().getInitParameter(iClientInputTimeout); -iClientInputTimeout = Integer.parseInt(value); } catch (Throwable t) { //NOOP } @@ -328,13 +316,7 @@ } // Identify the internal container resources we need -//Wrapper wrapper = (Wrapper) getServletConfig(); -//context = (Context) wrapper.getParent(); - context = config.getServletContext(); -if (debug = 1) { -//log(init: Associated with Context ' + context.getPath() + '); -} } 1.5 +0 -3 jakarta-tomcat-catalina/webapps/docs/cgi-howto.xml Index: cgi-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/cgi-howto.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- cgi-howto.xml 19 Feb 2004 21:37:27 - 1.4 +++ cgi-howto.xml 16 Aug 2004 22:26:50 - 1.5 @@ -56,9 +56,6 @@ listrongcgiPathPrefix/strong - The CGI search path will start at the web application root directory + File.separator + this prefix. The default cgiPathPrefix is code/WEB-INF/cgi/code/li -listrongclientInputTimeout/strong - The time (in milliseconds) to -wait for input from the browser before assuming that there is none. -Default is code100/code seconds./li listrongdebug/strong - Debugging detail level for messages logged by this servlet. Default 0./li listrongexecutable/strong - The of the
RE: cvs commit: jakarta-tomcat-catalina/webapps/docs cgi-howto.xml
Sorry. Finger trouble. Comment for this should have been: Housekeeping in CGI servlet. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 11:27 PM To: [EMAIL PROTECTED] Subject: cvs commit: jakarta-tomcat-catalina/webapps/docs cgi-howto.xml markt 2004/08/16 15:26:50 Modified:catalina/src/conf web.xml catalina/src/share/org/apache/catalina/servlets CGIServlet.java webapps/docs cgi-howto.xml Log: Revision ChangesPath 1.40 +0 -8 jakarta-tomcat-catalina/catalina/src/conf/web.xml Index: web.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/conf/web.xml,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- web.xml 20 Apr 2004 22:22:04 - 1.39 +++ web.xml 16 Aug 2004 22:26:49 - 1.40 @@ -262,10 +262,6 @@ !-- webAppRootDir + File.separator + this prefix. -- !-- [WEB-INF/cgi] -- !-- -- - !-- clientInputTimeout The time (in milliseconds) to wait for input -- - !-- from the browser before assuming that there-- - !-- is none. [100] -- - !-- -- !-- debug Debugging detail level for messages logged -- !-- by this servlet. [0] -- !-- -- @@ -284,10 +280,6 @@ servlet servlet-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class -init-param - param-nameclientInputTimeout/param-name - param-value100/param-value -/init-param init-param param-namedebug/param-name param-value6/param-value 1.23 +5 -23 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina /servlets/CGIServlet.java Index: CGIServlet.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apach e/catalina/servlets/CGIServlet.java,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- CGIServlet.java 16 Jun 2004 18:22:20 - 1.22 +++ CGIServlet.java 16 Aug 2004 22:26:50 - 1.23 @@ -247,21 +247,12 @@ /* some vars below copied from Craig R. McClanahan's InvokerServlet */ -/** the string manager for this package. */ -/* YAGNI -private static StringManager sm = -StringManager.getManager(Constants.Package); -*/ - /** the Context container associated with our web application. */ private ServletContext context = null; /** the debugging detail level for this servlet. */ private int debug = 0; -/** the time in ms to wait for the client to send us CGI input data */ -private int iClientInputTimeout = 100; - /** * The CGI search path will start at *webAppRootDir + File.separator + cgiPathPrefix @@ -314,9 +305,6 @@ debug = Integer.parseInt(value); cgiPathPrefix = getServletConfig().getInitParameter(cgiPathPrefix); -value = - getServletConfig().getInitParameter(iClientInputTimeout); -iClientInputTimeout = Integer.parseInt(value); } catch (Throwable t) { //NOOP } @@ -328,13 +316,7 @@ } // Identify the internal container resources we need -//Wrapper wrapper = (Wrapper) getServletConfig(); -//context = (Context) wrapper.getParent(); - context = config.getServletContext(); -if (debug = 1) { -//log(init: Associated with Context ' + context.getPath() + '); -} } 1.5 +0 -3 jakarta-tomcat-catalina/webapps/docs/cgi-howto.xml Index: cgi-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/cgi-howto.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- cgi-howto.xml 19 Feb 2004 21:37:27 - 1.4 +++ cgi-howto.xml 16 Aug 2004 22:26:50 - 1.5 @@ -56,9 +56,6 @@ listrongcgiPathPrefix/strong - The CGI search path
cvs commit: jakarta-tomcat-catalina/webapps/docs cgi-howto.xml
markt 2004/02/19 13:37:27 Modified:catalina/src/conf web.xml catalina/src/share/org/apache/catalina/servlets CGIServlet.java webapps/docs cgi-howto.xml Log: Fix bug 27090. Make parameter encoding configurable. Default remains as is. Update docs. Add executable paramater to docs. Revision ChangesPath 1.36 +4 -0 jakarta-tomcat-catalina/catalina/src/conf/web.xml Index: web.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/conf/web.xml,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- web.xml 18 Feb 2004 21:24:45 - 1.35 +++ web.xml 19 Feb 2004 21:37:27 - 1.36 @@ -272,6 +272,10 @@ !-- executable Name of the exectuable used to run the script. -- !-- [perl] -- !-- -- + !-- parameterEncoding Name of parameter encoding to be used with CGI -- + !-- servlet. -- + !-- [System.getProperty(file.encoding,UTF-8)] -- + !-- -- !-- IMPORTANT: To use the CGI servlet, you also need to rename the -- !--$CATALINA_HOME/server/lib/servlets-cgi.renametojar file -- !--to $CATALINA_HOME/server/lib/servlets-cgi.jar -- 1.16 +14 -9 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Index: CGIServlet.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- CGIServlet.java 16 Feb 2004 23:40:42 - 1.15 +++ CGIServlet.java 19 Feb 2004 21:37:27 - 1.16 @@ -315,6 +315,10 @@ /** the command to use with the script */ private String cgiExecutable = perl; +/** the encoding to use for parameters */ +private String parameterEncoding = System.getProperty(file.encoding, + UTF-8); + /** object used to ensure multiple threads don't try to expand same file */ static Object expandFileLock = new Object(); @@ -766,7 +770,8 @@ String param = paramNames.nextElement().toString(); if (param != null) { queryParameters.put( -param, URLEncoder.encode(req.getParameter(param))); +param, URLEncoder.encode(req.getParameter(param), + parameterEncoding)); } } @@ -1658,7 +1663,7 @@ if ((k.indexOf(=) 0) (v.indexOf(=) 0)) { StringBuffer arg = new StringBuffer(k); arg.append(=); -v = java.net.URLEncoder.encode(v); +v = java.net.URLEncoder.encode(v, parameterEncoding); arg.append(v); if (arg.toString().indexOf( ) 0) { cmdAndArgs.append(arg); 1.4 +5 -0 jakarta-tomcat-catalina/webapps/docs/cgi-howto.xml Index: cgi-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/cgi-howto.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- cgi-howto.xml 12 Feb 2004 16:51:36 - 1.3 +++ cgi-howto.xml 19 Feb 2004 21:37:27 - 1.4 @@ -61,6 +61,11 @@ Default is code100/code seconds./li listrongdebug/strong - Debugging detail level for messages logged by this servlet. Default 0./li +listrongexecutable/strong - The of the executable to be used to +run the script. Default is codeperl/code./li +listrongparameterEncoding/strong - Name of the parameter encoding +to be used with the GCI servlet. Default is +codeSystem.getProperty(file.encoding,UTF-8)/code./li /ul /p - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/webapps/docs cgi-howto.xml
idarwin 2004/02/12 08:51:36 Modified:webapps/docs cgi-howto.xml Log: Add a bit of explanatory text. Revision ChangesPath 1.3 +7 -3 jakarta-tomcat-catalina/webapps/docs/cgi-howto.xml Index: cgi-howto.xml === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/docs/cgi-howto.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cgi-howto.xml 15 Jan 2003 03:40:43 - 1.2 +++ cgi-howto.xml 12 Feb 2004 16:51:36 - 1.3 @@ -20,9 +20,13 @@ referred to as CGI programs or CGI scripts. /p -pWithin Tomcat CGI support can be added when using Tomcat as your -HTTP server and you require CGI support. Typically this is done -during development when you don't want to run a web server like Apache./p +pWithin Tomcat, CGI support can be added when you are using Tomcat as your +HTTP server and require CGI support. Typically this is done +during development when you don't want to run a web server like +Apache httpd. +Tomcat's CGI support is largely compatible with Apache httpd's, +but there are some limitations (e.g., only one cgi-bin directory). +/p pCGI support is implemented using the servlet class codeorg.apache.catalina.servlets.CGIServlet/code. Traditionally, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]