cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs cgi-howto.xml
markt 2005/05/23 15:46:57 Modified:.RUNNING.txt webapps/tomcat-docs cgi-howto.xml Log: Fix bug 13240. Add note to docs that 1.3 JDK is required to use CGI. Revision ChangesPath 1.8 +4 -1 jakarta-tomcat-4.0/RUNNING.txt Index: RUNNING.txt === RCS file: /home/cvs/jakarta-tomcat-4.0/RUNNING.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- RUNNING.txt 18 Jun 2004 23:32:27 - 1.7 +++ RUNNING.txt 23 May 2005 22:46:57 - 1.8 @@ -21,6 +21,9 @@ present in the JRE to compile JSP pages. Unless you are *very* sure of what you are doing, please use the full SDK. +NOTE: Use of the CGI Servlet requires Java 2 Standard Edition (J2SE) SDK, +release version 1.3 or later. + * Install the SDK according to the instructions included with the release. * Set an environment variable JAVA_HOME to the pathname of the directory 1.7 +2 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/cgi-howto.xml Index: cgi-howto.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/cgi-howto.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- cgi-howto.xml 28 Sep 2004 21:51:50 - 1.6 +++ cgi-howto.xml 23 May 2005 22:46:57 - 1.7 @@ -29,6 +29,8 @@ this servlet is mapped to the URL pattern /cgi-bin/*./p pBy default CGI support is disabled in Tomcat./p + +pNote that the CGI Servlet requires a 1.3 or later JDK./p /section section name=Installation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs cgi-howto.xml
markt 2004/09/28 14:51:50 Modified:catalina/src/conf web.xml catalina/src/share/org/apache/catalina/servlets CGIServlet.java webapps/tomcat-docs cgi-howto.xml Log: Revert RFE 27090 as it introduced a JDK 1.4 dependency Revision ChangesPath 1.59 +0 -4 jakarta-tomcat-4.0/catalina/src/conf/web.xml Index: web.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/web.xml,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- web.xml 17 Aug 2004 21:44:32 - 1.58 +++ web.xml 28 Sep 2004 21:51:49 - 1.59 @@ -236,10 +236,6 @@ !-- executable Name of the exectuable used to run the-- !--script. [perl]-- !-- -- - !-- 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] -- !-- -- 1.28 +6 -11 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Index: CGIServlet.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- CGIServlet.java 26 Aug 2004 21:38:13 - 1.27 +++ CGIServlet.java 28 Sep 2004 21:51:49 - 1.28 @@ -263,10 +263,6 @@ /** the executable 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(); @@ -768,8 +764,7 @@ if (param != null) { String values[] = req.getParameterValues(param); for (int i=0; i values.length; i++) { -String value = URLEncoder.encode(values[i], - parameterEncoding); +String value = URLEncoder.encode(values[i]); NameValuePair nvp = new NameValuePair(param, value); queryParameters.add(nvp); } 1.6 +0 -3 jakarta-tomcat-4.0/webapps/tomcat-docs/cgi-howto.xml Index: cgi-howto.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/cgi-howto.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- cgi-howto.xml 17 Aug 2004 21:44:32 - 1.5 +++ cgi-howto.xml 28 Sep 2004 21:51:50 - 1.6 @@ -56,9 +56,6 @@ 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 listrongpassShellEnvironment/strong - Should the shell environment variables (if any) be passed to the CGI script? Default is codefalse/code./li - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs cgi-howto.xml
markt 2004/08/17 14:44:33 Modified:catalina/src/conf web.xml catalina/src/share/org/apache/catalina/servlets CGIServlet.java webapps/tomcat-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 Revision ChangesPath 1.58 +14 -12jakarta-tomcat-4.0/catalina/src/conf/web.xml Index: web.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/web.xml,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- web.xml 16 Aug 2004 22:29:33 - 1.57 +++ web.xml 17 Aug 2004 21:44:32 - 1.58 @@ -226,19 +226,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 -- @@ -256,10 +259,9 @@ param-namecgiPathPrefix/param-name param-valueWEB-INF/cgi/param-value /init-param - load-on-startup5/load-on-startup +load-on-startup5/load-on-startup /servlet -- - !-- Built In Servlet Mappings = -- 1.26 +69 -9 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Index: CGIServlet.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- CGIServlet.java 16 Aug 2004 22:29:33 - 1.25 +++ CGIServlet.java 17 Aug 2004 21:44:32 - 1.26 @@ -315,6 +315,8 @@ /** 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. @@ -343,6 +345,8 @@ throw new UnavailableException (Cannot invoke CGIServlet through the invoker); +boolean passShellEnvironment = false; + // Set our properties from the
cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs cgi-howto.xml
markt 2004/08/16 15:29:34 Modified:catalina/src/conf web.xml catalina/src/share/org/apache/catalina/servlets CGIServlet.java webapps/tomcat-docs cgi-howto.xml Log: Housekeeping in CGI servlet Revision ChangesPath 1.57 +0 -8 jakarta-tomcat-4.0/catalina/src/conf/web.xml Index: web.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/web.xml,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- web.xml 20 Apr 2004 22:21:09 - 1.56 +++ web.xml 16 Aug 2004 22:29:33 - 1.57 @@ -230,10 +230,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] -- !-- -- @@ -252,10 +248,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.25 +7 -25 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Index: CGIServlet.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- CGIServlet.java 16 Jun 2004 18:21:54 - 1.24 +++ CGIServlet.java 16 Aug 2004 22:29:33 - 1.25 @@ -291,21 +291,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 @@ -359,9 +350,6 @@ debug = Integer.parseInt(value); cgiPathPrefix = getServletConfig().getInitParameter(cgiPathPrefix); -value = -getServletConfig().getInitParameter(iClientInputTimeout); -iClientInputTimeout = Integer.parseInt(value); } catch (Throwable t) { //NOOP } @@ -373,13 +361,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.4 +0 -3 jakarta-tomcat-4.0/webapps/tomcat-docs/cgi-howto.xml Index: cgi-howto.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/cgi-howto.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- cgi-howto.xml 19 Feb 2004 21:38:50 - 1.3 +++ cgi-howto.xml 16 Aug 2004 22:29:34 - 1.4 @@ -52,9 +52,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
cvs commit: jakarta-tomcat-4.0/webapps/tomcat-docs cgi-howto.xml
markt 2004/02/19 13:38:50 Modified:catalina/src/conf web.xml catalina/src/share/org/apache/catalina/servlets CGIServlet.java webapps/tomcat-docs cgi-howto.xml Log: Fix bug 27090. Make parameter encoding configurable. Default remains as is. Update docs. Add executable paramater to docs. Port from TC5. Revision ChangesPath 1.53 +4 -0 jakarta-tomcat-4.0/catalina/src/conf/web.xml Index: web.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/conf/web.xml,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- web.xml 10 Dec 2003 22:15:03 - 1.52 +++ web.xml 19 Feb 2004 21:38:49 - 1.53 @@ -244,6 +244,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.19 +14 -9 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java Index: CGIServlet.java === RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- CGIServlet.java 16 Feb 2004 23:41:54 - 1.18 +++ CGIServlet.java 19 Feb 2004 21:38:49 - 1.19 @@ -314,6 +314,10 @@ /** the executable 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(); @@ -768,7 +772,8 @@ String param = paramNames.nextElement().toString(); if (param != null) { queryParameters.put( -param, URLEncoder.encode(req.getParameter(param))); +param, URLEncoder.encode(req.getParameter(param), + parameterEncoding)); } } @@ -1664,7 +1669,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.3 +5 -0 jakarta-tomcat-4.0/webapps/tomcat-docs/cgi-howto.xml Index: cgi-howto.xml === RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/tomcat-docs/cgi-howto.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cgi-howto.xml 12 Jan 2003 17:26:46 - 1.2 +++ cgi-howto.xml 19 Feb 2004 21:38:50 - 1.3 @@ -57,6 +57,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]