Index: /main/trunk/greenstone3/resources/tomcat/web8.xml.svn
===================================================================
--- /main/trunk/greenstone3/resources/tomcat/web8.xml.svn	(revision 34001)
+++ /main/trunk/greenstone3/resources/tomcat/web8.xml.svn	(revision 34002)
@@ -16,4 +16,16 @@
   limitations under the License.
 -->
+<!-- GSDL Notes
+  To turn a new default 'tomcatN.x.yy/conf/web.xml' into a webN.xml.svn
+
+  Uncomment the CGI servlet element, and updated so (init) params:
+    'debug' is 0,
+    'passShellEnvironment' is 0
+    'executable' is @perlpath@perl
+
+  Then uncomment the corresponding servlet-mapping element for CGI
+-->
+  
+
 <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -48,4 +60,9 @@
   <!--   fileEncoding        Encoding to be used to read static resources   -->
   <!--                       [platform default]                             -->
+  <!--                                                                      -->
+  <!--   useBomIfPresent     If a static file contains a byte order mark    -->
+  <!--                       (BOM), should this be used to determine the    -->
+  <!--                       file encoding in preference to fileEncoding.   -->
+  <!--                       [true]                                         -->
   <!--                                                                      -->
   <!--   input               Input buffer size (in bytes) when reading      -->
@@ -100,4 +117,9 @@
   <!--                       response sent to clients when directory        -->
   <!--                       listings is enabled? [true]                    -->
+  <!--                                                                      -->
+  <!--   allowPartialPut     Should the server treat an HTTP PUT request    -->
+  <!--                       with a Range header as a partial PUT? Note     -->
+  <!--                       that RFC 7233 clarified that Range headers are -->
+  <!--                       only valid for GET requests. [true]            -->
 
     <servlet>
@@ -336,8 +358,30 @@
   <!--                        Recommended value: WEB-INF/cgi                -->
   <!--                                                                      -->
+  <!--  cmdLineArgumentsDecoded                                             -->
+  <!--                        Only used when enableCmdLineArguments is      -->
+  <!--                        true. The pattern that individual decoded     -->
+  <!--                        command line arguments must match else the    -->
+  <!--                        request will be rejected. This is to          -->
+  <!--                        work-around various issues when Java passes   -->
+  <!--                        the arguments to the OS. See the CGI How-To   -->
+  <!--                        for more details. The default varies by       -->
+  <!--                        platform.                                     -->
+  <!--                        Windows: [[a-zA-Z0-9\Q-_.\\/:\E]+]            -->
+  <!--                        Others:  [.*]                                 -->
+  <!--                        Note that internally the CGI Servlet treats   -->
+  <!--                        [.*] as a special case to improve performance -->
+  <!--                                                                      -->
+  <!--   cmdLineArgumentsEncoded                                            -->
+  <!--                        Only used when enableCmdLineArguments is      -->
+  <!--                        true. The pattern that individual encoded     -->
+  <!--                        command line arguments must match else the    -->
+  <!--                        request will be rejected. The default matches -->
+  <!--                        the allowed values defined by RFC3875.        -->
+  <!--                        [[a-zA-Z0-9\Q%;/?:@&,$-_.!~*'()\E]+]          -->
+  <!--                                                                      -->
   <!--   enableCmdLineArguments                                             -->
   <!--                        Are command line parameters generated from    -->
   <!--                        the query string as per section 4.4 of 3875   -->
-  <!--                        RFC? [true]                                   -->
+  <!--                        RFC? [false]                                  -->
   <!--                                                                      -->
   <!--   executable           Name of the executable used to run the        -->
@@ -374,5 +418,5 @@
 
 
-  <!-- Greenstone makes use of CGI through some Perl scripts -->
+    <!-- GSDL: Greenstone makes use of CGI through some Perl scripts, so we need this element in-play  -->  
     <servlet>
         <servlet-name>cgi</servlet-name>
@@ -382,18 +426,18 @@
           <param-value>WEB-INF/cgi</param-value>
         </init-param>
+
         <init-param>
           <param-name>debug</param-name>
           <param-value>0</param-value>
         </init-param>
-
-	<init-param>
-	  <param-name>passShellEnvironment</param-name>
-	  <param-value>true</param-value>
-	</init-param>
-	<init-param>
-	  <param-name>executable</param-name>
-	  <param-value>@perlpath@perl</param-value>	
-	</init-param>
-
+        <init-param>
+          <param-name>passShellEnvironment</param-name>
+          <param-value>true</param-value>
+        </init-param>
+        <init-param>
+          <param-name>executable</param-name>
+          <param-value>@perlpath@perl</param-value>
+        </init-param>
+	
         <load-on-startup>5</load-on-startup>
     </servlet>
@@ -432,5 +476,5 @@
     <!-- The mapping for the CGI Gateway servlet -->
 
-
+    <!-- GSDL: Greenstone makes use of CGI through some Perl scripts, so we need this element in-play  -->
     <servlet-mapping>
         <servlet-name>cgi</servlet-name>
