alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Tomcat example source code file (web.xml)

This example Tomcat source code file (web.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Tomcat tags/keywords

cgi, filter, if, jsp, jsp, license, opendocument, should, should, ssi, ssi, the, the, this

The Tomcat web.xml source code

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">

  <!-- ======================== Introduction ============================== -->
  <!-- This document defines default values for *all* web applications      -->
  <!-- loaded into this instance of Tomcat.  As each application is         -->
  <!-- deployed, this file is processed, followed by the                    -->
  <!-- "/WEB-INF/web.xml" deployment descriptor from your own               -->
  <!-- applications.                                                        -->
  <!--                                                                      -->
  <!-- WARNING:  Do not configure application-specific resources here!      -->
  <!-- They should go in the "/WEB-INF/web.xml" file in your application.   -->


  <!-- ================== Built In Servlet Definitions ==================== -->


  <!-- The default servlet for all web applications, that serves static     -->
  <!-- resources.  It processes all requests that are not mapped to other   -->
  <!-- servlets with servlet mappings (defined either here or in your own   -->
  <!-- web.xml file.  This servlet supports the following initialization    -->
  <!-- parameters (default values are in square brackets):                  -->
  <!--                                                                      -->
  <!--   debug               Debugging detail level for messages logged     -->
  <!--                       by this servlet.  [0]                          -->
  <!--                                                                      -->
  <!--   fileEncoding        Encoding to be used to read static resources   -->
  <!--                       [platform default]                             -->
  <!--                                                                      -->
  <!--   input               Input buffer size (in bytes) when reading      -->
  <!--                       resources to be served.  [2048]                -->
  <!--                                                                      -->
  <!--   listings            Should directory listings be produced if there -->
  <!--                       is no welcome file in this directory?  [false] -->
  <!--                       WARNING: Listings for directories with many    -->
  <!--                       entries can be slow and may consume            -->
  <!--                       significant proportions of server resources.   -->
  <!--                                                                      -->
  <!--   output              Output buffer size (in bytes) when writing     -->
  <!--                       resources to be served.  [2048]                -->
  <!--                                                                      -->
  <!--   readonly            Is this context "read only", so HTTP           -->
  <!--                       commands like PUT and DELETE are               -->
  <!--                       rejected?  [true]                              -->
  <!--                                                                      -->
  <!--   readmeFile          File name to display with the directory        -->
  <!--                       contents. [null]                               -->
  <!--                                                                      -->
  <!--   sendfileSize        If the connector used supports sendfile, this  -->
  <!--                       represents the minimal file size in KB for     -->
  <!--                       which sendfile will be used. Use a negative    -->
  <!--                       value to always disable sendfile.  [48]        -->
  <!--                                                                      -->
  <!--  For directory listing customization. Checks localXsltFile, then     -->
  <!--  globalXsltFile, then defaults to original behavior.                 -->
  <!--                                                                      -->
  <!--   localXsltFile       Make directory listings an XML doc and         -->
  <!--                       pass the result to this style sheet residing   -->
  <!--                       in that directory. This overrides              -->
  <!--                        globalXsltFile[null]                          -->
  <!--                                                                      -->
  <!--   globalXsltFile      Site wide configuration version of             -->
  <!--                       localXsltFile This argument is expected        -->
  <!--                       to be a physical file. [null]                  -->
  <!--                                                                      -->
  <!--                                                                      -->

    <servlet>
        <servlet-name>default
        <servlet-class>org.apache.catalina.servlets.DefaultServlet
        <init-param>
            <param-name>debug
            <param-value>0
        </init-param>
        <init-param>
            <param-name>listings
            <param-value>false
        </init-param>
        <load-on-startup>1
    </servlet>


  <!-- The "invoker" servlet, which executes anonymous servlet classes      -->
  <!-- that have not been defined in a web.xml file.  Traditionally, this   -->
  <!-- servlet is mapped to the URL pattern "/servlet/*", but you can map   -->
  <!-- it to other patterns as well.  The extra path info portion of such a -->
  <!-- request must be the fully qualified class name of a Java class that  -->
  <!-- implements Servlet (or extends HttpServlet), or the servlet name     -->
  <!-- of an existing servlet definition.     This servlet supports the     -->
  <!-- following initialization parameters (default values are in square    -->
  <!-- brackets):                                                           -->
  <!--                                                                      -->
  <!--   debug               Debugging detail level for messages logged     -->
  <!--                       by this servlet.  [0]                          -->

<!--
    <servlet>
        <servlet-name>invoker
        <servlet-class>
          org.apache.catalina.servlets.InvokerServlet
        </servlet-class>
        <init-param>
            <param-name>debug
            <param-value>0
        </init-param>
        <load-on-startup>2
    </servlet>
-->


  <!-- The JSP page compiler and execution servlet, which is the mechanism  -->
  <!-- used by Tomcat to support JSP pages.  Traditionally, this servlet    -->
  <!-- is mapped to the URL pattern "*.jsp".  This servlet supports the     -->
  <!-- following initialization parameters (default values are in square    -->
  <!-- brackets):                                                           -->
  <!--                                                                      -->
  <!--   checkInterval       If development is false and checkInterval is   -->
  <!--                       greater than zero, background compilations are -->
  <!--                       enabled. checkInterval is the time in seconds  -->
  <!--                       between checks to see if a JSP page (and its   -->
  <!--                       dependent files) needs to  be recompiled. [0]  -->
  <!--                                                                      -->
  <!--   classdebuginfo      Should the class file be compiled with         -->
  <!--                       debugging information?  [true]                 -->
  <!--                                                                      -->
  <!--   classpath           What class path should I use while compiling   -->
  <!--                       generated servlets?  [Created dynamically      -->
  <!--                       based on the current web application]          -->
  <!--                                                                      -->
  <!--   compiler            Which compiler Ant should use to compile JSP   -->
  <!--                       pages.  See the jasper documentation for more  -->
  <!--                       information.                                   -->
  <!--                                                                      -->
  <!--   compilerSourceVM    Compiler source VM                             -->
  <!--                       default is System.properties                   -->
  <!--                        java.specification.version > 1.4              -->
  <!--                        [1.5] else [1.4]                              -->
  <!--                                                                      -->
  <!--   compilerTargetVM    Compiler target VM                             -->  
  <!--                       default is System.properties                   -->
  <!--                        java.specification.version > 1.4              -->
  <!--                        [1.5] else [1.4]                              -->
  <!--                                                                      -->
  <!--   development         Is Jasper used in development mode? If true,   -->
  <!--                       the frequency at which JSPs are checked for    -->
  <!--                       modification may be specified via the          -->
  <!--                       modificationTestInterval parameter. [true]     -->
  <!--                                                                      -->
  <!--   displaySourceFragment                                              -->
  <!--                       Should a source fragment be included in        -->
  <!--                       exception messages? [true]                     -->
  <!--                                                                      -->
  <!--   dumpSmap            Should the SMAP info for JSR45 debugging be    -->
  <!--                       dumped to a file? [false]                      -->
  <!--                       False if suppressSmap is true                  -->
  <!--                                                                      -->
  <!--   enablePooling       Determines whether tag handler pooling is      -->
  <!--                       enabled  [true]                                -->
  <!--                                                                      -->
  <!--   engineOptionsClass  Allows specifying the Options class used to    -->
  <!--                       configure Jasper. If not present, the default  -->
  <!--                       EmbeddedServletOptions will be used.           -->
  <!--                                                                      -->
  <!--   errorOnUseBeanInvalidClassAttribute                                -->
  <!--                       Should Jasper issue an error when the value of -->
  <!--                       the class attribute in an useBean action is    -->
  <!--                       not a valid bean class?  [true]                -->
  <!--                                                                      -->
  <!--   fork                Tell Ant to fork compiles of JSP pages so that -->
  <!--                       a separate JVM is used for JSP page compiles   -->
  <!--                       from the one Tomcat is running in. [true]      -->
  <!--                                                                      -->
  <!--   genStrAsCharArray   Should text strings be generated as char       -->
  <!--                       arrays, to improve performance in some cases?  -->
  <!--                       [false]                                        -->
  <!--                                                                      -->
  <!--   ieClassId           The class-id value to be sent to Internet      -->
  <!--                       Explorer when using 
  <!--                       [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93]   -->
  <!--                                                                      -->
  <!--   javaEncoding        Java file encoding to use for generating java  -->
  <!--                       source files. [UTF8]                           -->
  <!--                                                                      -->
  <!--   keepgenerated       Should we keep the generated Java source code  -->
  <!--                       for each page instead of deleting it? [true]   -->
  <!--                                                                      -->
  <!--   mappedfile          Should we generate static content with one     -->
  <!--                       print statement per input line, to ease        -->
  <!--                       debugging?  [true]                             -->
  <!--                                                                      -->
  <!--   modificationTestInterval                                           -->
  <!--                       Causes a JSP (and its dependent files) to not  -->
  <!--                       be checked for modification during the         -->
  <!--                       specified time interval (in seconds) from the  -->
  <!--                       last time the JSP was checked for              -->
  <!--                       modification. A value of 0 will cause the JSP  -->
  <!--                       to be checked on every access.                 -->
  <!--                       Used in development mode only. [4]             -->
  <!--                                                                      -->
  <!--   scratchdir          What scratch directory should we use when      -->
  <!--                       compiling JSP pages?  [default work directory  -->
  <!--                       for the current web application]               -->
  <!--                                                                      -->
  <!--   suppressSmap        Should the generation of SMAP info for JSR45   -->
  <!--                       debugging be suppressed?  [false]              -->
  <!--                                                                      -->
  <!--   trimSpaces          Should white spaces in template text between   -->
  <!--                       actions or directives be trimmed?  [false]     -->
  <!--                                                                      -->
  <!--   xpoweredBy          Determines whether X-Powered-By response       -->
  <!--                       header is added by generated servlet  [false]  -->
  <!--                                                                      -->
  <!-- If you wish to use Jikes to compile JSP pages:                       -->
  <!--   Please see the "Using Jikes" section of the Jasper-HowTo           -->
  <!--   page in the Tomcat documentation.                                  -->

    <servlet>
        <servlet-name>jsp
        <servlet-class>org.apache.jasper.servlet.JspServlet
        <init-param>
            <param-name>fork
            <param-value>false
        </init-param>
        <init-param>
            <param-name>xpoweredBy
            <param-value>false
        </init-param>
        <load-on-startup>3
    </servlet>


  <!-- NOTE: An SSI Filter is also available as an alternative SSI          -->
  <!-- implementation. Use either the Servlet or the Filter but NOT both.   -->
  <!--                                                                      -->
  <!-- Server Side Includes processing servlet, which processes SSI         -->
  <!-- directives in HTML pages consistent with similar support in web      -->
  <!-- servers like Apache.  Traditionally, this servlet is mapped to the   -->
  <!-- URL pattern "*.shtml".  This servlet supports the following          -->
  <!-- initialization parameters (default values are in square brackets):   -->
  <!--                                                                      -->
  <!--   buffered            Should output from this servlet be buffered?   -->
  <!--                       (0=false, 1=true)  [0]                         -->
  <!--                                                                      -->
  <!--   debug               Debugging detail level for messages logged     -->
  <!--                       by this servlet.  [0]                          -->
  <!--                                                                      -->
  <!--   expires             The number of seconds before a page with SSI   -->
  <!--                       directives will expire.  [No default]          -->
  <!--                                                                      -->
  <!--   isVirtualWebappRelative                                            -->
  <!--                       Should "virtual" paths be interpreted as       -->
  <!--                       relative to the context root, instead of       -->
  <!--                       the server root?  (0=false, 1=true) [0]        -->
  <!--                                                                      -->
  <!--   inputEncoding       The encoding to assume for SSI resources if    -->
  <!--                       one is not available from the resource.        -->
  <!--                       [Platform default]                             -->
  <!--                                                                      -->
  <!--   outputEncoding      The encoding to use for the page that results  -->
  <!--                       from the SSI processing. [UTF-8]               -->
  <!--                                                                      -->
  <!--                                                                      -->
  <!-- IMPORTANT: To use the SSI servlet, you also need to rename the       -->
  <!--            $CATALINA_HOME/server/lib/servlets-ssi.renametojar file   -->
  <!--            to $CATALINA_HOME/server/lib/servlets-ssi.jar             -->

<!--
    <servlet>
        <servlet-name>ssi
        <servlet-class>
          org.apache.catalina.ssi.SSIServlet
        </servlet-class>
        <init-param>
          <param-name>buffered
          <param-value>1
        </init-param>
        <init-param>
          <param-name>debug
          <param-value>0
        </init-param>
        <init-param>
          <param-name>expires
          <param-value>666
        </init-param>
        <init-param>
          <param-name>isVirtualWebappRelative
          <param-value>0
        </init-param>
        <load-on-startup>4
    </servlet>
-->


  <!-- Common Gateway Includes (CGI) processing servlet, which supports     -->
  <!-- execution of external applications that conform to the CGI spec      -->
  <!-- requirements.  Typically, this servlet is mapped to the URL pattern  -->
  <!-- "/cgi-bin/*", which means that any CGI applications that are         -->
  <!-- executed must be present within the web application.  This servlet   -->
  <!-- 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]                                 -->
  <!--                                                                      -->
  <!--   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")] -->
  <!--                                                                      -->
  <!--   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   -->
  <!--            to $CATALINA_HOME/server/lib/servlets-cgi.jar             -->

<!--
    <servlet>
        <servlet-name>cgi
        <servlet-class>org.apache.catalina.servlets.CGIServlet
        <init-param>
          <param-name>debug
          <param-value>0
        </init-param>
        <init-param>
          <param-name>cgiPathPrefix
          <param-value>WEB-INF/cgi
        </init-param>
         <load-on-startup>5
    </servlet>
-->


  <!-- ================ Built In Servlet Mappings ========================= -->


  <!-- The servlet mappings for the built in servlets defined above.  Note  -->
  <!-- that, by default, the CGI and SSI servlets are *not* mapped.  You    -->
  <!-- must uncomment these mappings (or add them to your application's own -->
  <!-- web.xml deployment descriptor) to enable these services              -->

    <!-- The mapping for the default servlet -->
    <servlet-mapping>
        <servlet-name>default
        <url-pattern>/
    </servlet-mapping>

    <!-- The mapping for the invoker servlet -->
<!--
    <servlet-mapping>
        <servlet-name>invoker
        <url-pattern>/servlet/*
    </servlet-mapping>
-->

    <!-- The mapping for the JSP servlet -->
    <servlet-mapping>
        <servlet-name>jsp
        <url-pattern>*.jsp
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>jsp
        <url-pattern>*.jspx
    </servlet-mapping>

    <!-- The mapping for the SSI servlet -->
<!--
    <servlet-mapping>
        <servlet-name>ssi
        <url-pattern>*.shtml
    </servlet-mapping>
-->

    <!-- The mapping for the CGI Gateway servlet -->

<!--
    <servlet-mapping>
        <servlet-name>cgi
        <url-pattern>/cgi-bin/*
    </servlet-mapping>
-->


  <!-- ================== Built In Filter Definitions ===================== -->

  <!-- NOTE: An SSI Servlet is also available as an alternative SSI         -->
  <!-- implementation. Use either the Servlet or the Filter but NOT both.   -->
  <!--                                                                      -->
  <!-- Server Side Includes processing filter, which processes SSI          -->
  <!-- directives in HTML pages consistent with similar support in web      -->
  <!-- servers like Apache.  Traditionally, this filter is mapped to the    -->
  <!-- URL pattern "*.shtml", though it can be mapped to "*" as it will     -->
  <!-- selectively enable/disable SSI processing based on mime types. For   -->
  <!-- this to work you will need to uncomment the .shtml mime type         -->
  <!-- definition towards the bottom of this file.                          -->
  <!-- The contentType init param allows you to apply SSI processing to JSP -->
  <!-- pages, javascript, or any other content you wish.  This filter       -->
  <!-- supports the following initialization parameters (default values are -->
  <!-- in square brackets):                                                 -->
  <!--                                                                      -->
  <!--   contentType         A regex pattern that must be matched before    -->
  <!--                       SSI processing is applied.                     -->
  <!--                       [text/x-server-parsed-html(;.*)?]              -->
  <!--                                                                      -->
  <!--   debug               Debugging detail level for messages logged     -->
  <!--                       by this servlet.  [0]                          -->
  <!--                                                                      -->
  <!--   expires             The number of seconds before a page with SSI   -->
  <!--                       directives will expire.  [No default]          -->
  <!--                                                                      -->
  <!--   isVirtualWebappRelative                                            -->
  <!--                       Should "virtual" paths be interpreted as       -->
  <!--                       relative to the context root, instead of       -->
  <!--                       the server root?  (0=false, 1=true) [0]        -->
  <!--                                                                      -->
  <!--                                                                      -->
  <!-- IMPORTANT: To use the SSI filter, you also need to rename the        -->
  <!--            $CATALINA_HOME/server/lib/servlets-ssi.renametojar file   -->
  <!--            to $CATALINA_HOME/server/lib/servlets-ssi.jar             -->

<!--
    <filter>
        <filter-name>ssi
        <filter-class>
          org.apache.catalina.ssi.SSIFilter
        </filter-class>
        <init-param>
          <param-name>contentType
          <param-value>text/x-server-parsed-html(;.*)?
        </init-param>
        <init-param>
          <param-name>debug
          <param-value>0
        </init-param>
        <init-param>
          <param-name>expires
          <param-value>666
        </init-param>
        <init-param>
          <param-name>isVirtualWebappRelative
          <param-value>0
        </init-param>
    </filter>
-->


  <!-- ==================== Built In Filter Mappings ====================== -->

  <!-- The mapping for the SSI Filter -->
<!--
    <filter-mapping>
        <filter-name>ssi
        <url-pattern>*.shtml
    </filter-mapping>
-->


  <!-- ==================== Default Session Configuration ================= -->
  <!-- You can set the default session timeout (in minutes) for all newly   -->
  <!-- created sessions by modifying the value below.                       -->

    <session-config>
        <session-timeout>30
    </session-config>


  <!-- ===================== Default MIME Type Mappings =================== -->
  <!-- When serving static resources, Tomcat will automatically generate    -->
  <!-- a "Content-Type" header based on the resource's filename extension,  -->
  <!-- based on these mappings.  Additional mappings can be added here (to  -->
  <!-- apply to all web applications), or in your own application's web.xml -->
  <!-- deployment descriptor.                                               -->

    <mime-mapping>
        <extension>abs
        <mime-type>audio/x-mpeg
    </mime-mapping>
    <mime-mapping>
        <extension>ai
        <mime-type>application/postscript
    </mime-mapping>
    <mime-mapping>
        <extension>aif
        <mime-type>audio/x-aiff
    </mime-mapping>
    <mime-mapping>
        <extension>aifc
        <mime-type>audio/x-aiff
    </mime-mapping>
    <mime-mapping>
        <extension>aiff
        <mime-type>audio/x-aiff
    </mime-mapping>
    <mime-mapping>
        <extension>aim
        <mime-type>application/x-aim
    </mime-mapping>
    <mime-mapping>
        <extension>art
        <mime-type>image/x-jg
    </mime-mapping>
    <mime-mapping>
        <extension>asf
        <mime-type>video/x-ms-asf
    </mime-mapping>
    <mime-mapping>
        <extension>asx
        <mime-type>video/x-ms-asf
    </mime-mapping>
    <mime-mapping>
        <extension>au
        <mime-type>audio/basic
    </mime-mapping>
    <mime-mapping>
        <extension>avi
        <mime-type>video/x-msvideo
    </mime-mapping>
    <mime-mapping>
        <extension>avx
        <mime-type>video/x-rad-screenplay
    </mime-mapping>
    <mime-mapping>
        <extension>bcpio
        <mime-type>application/x-bcpio
    </mime-mapping>
    <mime-mapping>
        <extension>bin
        <mime-type>application/octet-stream
    </mime-mapping>
    <mime-mapping>
        <extension>bmp
        <mime-type>image/bmp
    </mime-mapping>
    <mime-mapping>
        <extension>body
        <mime-type>text/html
    </mime-mapping>
    <mime-mapping>
        <extension>cdf
        <mime-type>application/x-cdf
    </mime-mapping>
    <mime-mapping>
        <extension>cer
        <mime-type>application/x-x509-ca-cert
    </mime-mapping>
    <mime-mapping>
        <extension>class
        <mime-type>application/java
    </mime-mapping>
    <mime-mapping>
        <extension>cpio
        <mime-type>application/x-cpio
    </mime-mapping>
    <mime-mapping>
        <extension>csh
        <mime-type>application/x-csh
    </mime-mapping>
    <mime-mapping>
        <extension>css
        <mime-type>text/css
    </mime-mapping>
    <mime-mapping>
        <extension>dib
        <mime-type>image/bmp
    </mime-mapping>
    <mime-mapping>
        <extension>doc
        <mime-type>application/msword
    </mime-mapping>
    <mime-mapping>
        <extension>dtd
        <mime-type>application/xml-dtd
    </mime-mapping>
    <mime-mapping>
        <extension>dv
        <mime-type>video/x-dv
    </mime-mapping>
    <mime-mapping>
        <extension>dvi
        <mime-type>application/x-dvi
    </mime-mapping>
    <mime-mapping>
        <extension>eps
        <mime-type>application/postscript
    </mime-mapping>
    <mime-mapping>
        <extension>etx
        <mime-type>text/x-setext
    </mime-mapping>
    <mime-mapping>
        <extension>exe
        <mime-type>application/octet-stream
    </mime-mapping>
    <mime-mapping>
        <extension>gif
        <mime-type>image/gif
    </mime-mapping>
    <mime-mapping>
        <extension>gtar
        <mime-type>application/x-gtar
    </mime-mapping>
    <mime-mapping>
        <extension>gz
        <mime-type>application/x-gzip
    </mime-mapping>
    <mime-mapping>
        <extension>hdf
        <mime-type>application/x-hdf
    </mime-mapping>
    <mime-mapping>
        <extension>hqx
        <mime-type>application/mac-binhex40
    </mime-mapping>
    <mime-mapping>
        <extension>htc
        <mime-type>text/x-component
    </mime-mapping>
    <mime-mapping>
        <extension>htm
        <mime-type>text/html
    </mime-mapping>
    <mime-mapping>
        <extension>html
        <mime-type>text/html
    </mime-mapping>
    <mime-mapping>
        <extension>hqx
        <mime-type>application/mac-binhex40
    </mime-mapping>
    <mime-mapping>
        <extension>ief
        <mime-type>image/ief
    </mime-mapping>
    <mime-mapping>
        <extension>jad
        <mime-type>text/vnd.sun.j2me.app-descriptor
    </mime-mapping>
    <mime-mapping>
        <extension>jar
        <mime-type>application/java-archive
    </mime-mapping>
    <mime-mapping>
        <extension>java
        <mime-type>text/plain
    </mime-mapping>
    <mime-mapping>
        <extension>jnlp
        <mime-type>application/x-java-jnlp-file
    </mime-mapping>
    <mime-mapping>
        <extension>jpe
        <mime-type>image/jpeg
    </mime-mapping>
    <mime-mapping>
        <extension>jpeg
        <mime-type>image/jpeg
    </mime-mapping>
    <mime-mapping>
        <extension>jpg
        <mime-type>image/jpeg
    </mime-mapping>
    <mime-mapping>
        <extension>js
        <mime-type>text/javascript
    </mime-mapping>
    <mime-mapping>
        <extension>jsf
        <mime-type>text/plain
    </mime-mapping>
    <mime-mapping>
        <extension>jspf
        <mime-type>text/plain
    </mime-mapping>
    <mime-mapping>
        <extension>kar
        <mime-type>audio/x-midi
    </mime-mapping>
    <mime-mapping>
        <extension>latex
        <mime-type>application/x-latex
    </mime-mapping>
    <mime-mapping>
        <extension>m3u
        <mime-type>audio/x-mpegurl
    </mime-mapping>
    <mime-mapping>
        <extension>mac
        <mime-type>image/x-macpaint
    </mime-mapping>
    <mime-mapping>
        <extension>man
        <mime-type>application/x-troff-man
    </mime-mapping>
    <mime-mapping>
        <extension>mathml
        <mime-type>application/mathml+xml 
    </mime-mapping>
    <mime-mapping>
        <extension>me
        <mime-type>application/x-troff-me
    </mime-mapping>
    <mime-mapping>
        <extension>mid
        <mime-type>audio/x-midi
    </mime-mapping>
    <mime-mapping>
        <extension>midi
        <mime-type>audio/x-midi
    </mime-mapping>
    <mime-mapping>
        <extension>mif
        <mime-type>application/x-mif
    </mime-mapping>
    <mime-mapping>
        <extension>mov
        <mime-type>video/quicktime
    </mime-mapping>
    <mime-mapping>
        <extension>movie
        <mime-type>video/x-sgi-movie
    </mime-mapping>
    <mime-mapping>
        <extension>mp1
        <mime-type>audio/x-mpeg
    </mime-mapping>
    <mime-mapping>
        <extension>mp2
        <mime-type>audio/x-mpeg
    </mime-mapping>
    <mime-mapping>
        <extension>mp3
        <mime-type>audio/x-mpeg
    </mime-mapping>
    <mime-mapping>
        <extension>mp4
        <mime-type>video/mp4
    </mime-mapping>
    <mime-mapping>
        <extension>mpa
        <mime-type>audio/x-mpeg
    </mime-mapping>
    <mime-mapping>
        <extension>mpe
        <mime-type>video/mpeg
    </mime-mapping>
    <mime-mapping>
        <extension>mpeg
        <mime-type>video/mpeg
    </mime-mapping>
    <mime-mapping>
        <extension>mpega
        <mime-type>audio/x-mpeg
    </mime-mapping>
    <mime-mapping>
        <extension>mpg
        <mime-type>video/mpeg
    </mime-mapping>
    <mime-mapping>
        <extension>mpv2
        <mime-type>video/mpeg2
    </mime-mapping>
    <mime-mapping>
        <extension>ms
        <mime-type>application/x-wais-source
    </mime-mapping>
    <mime-mapping>
        <extension>nc
        <mime-type>application/x-netcdf
    </mime-mapping>
    <mime-mapping>
        <extension>oda
        <mime-type>application/oda
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Database -->
        <extension>odb
        <mime-type>application/vnd.oasis.opendocument.database
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Chart -->
        <extension>odc
        <mime-type>application/vnd.oasis.opendocument.chart
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Formula -->
        <extension>odf
        <mime-type>application/vnd.oasis.opendocument.formula
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Drawing -->
        <extension>odg
        <mime-type>application/vnd.oasis.opendocument.graphics
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Image -->
        <extension>odi
        <mime-type>application/vnd.oasis.opendocument.image
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Master Document -->
        <extension>odm
        <mime-type>application/vnd.oasis.opendocument.text-master
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Presentation -->
        <extension>odp
        <mime-type>application/vnd.oasis.opendocument.presentation
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Spreadsheet -->
        <extension>ods
        <mime-type>application/vnd.oasis.opendocument.spreadsheet
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Text -->
        <extension>odt
        <mime-type>application/vnd.oasis.opendocument.text
    </mime-mapping>
    <mime-mapping>
        <extension>ogg
        <mime-type>application/ogg
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Drawing Template -->
        <extension>otg 
        <mime-type>application/vnd.oasis.opendocument.graphics-template
    </mime-mapping>
    <mime-mapping>
        <!-- HTML Document Template -->
        <extension>oth
        <mime-type>application/vnd.oasis.opendocument.text-web
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Presentation Template -->
        <extension>otp
        <mime-type>application/vnd.oasis.opendocument.presentation-template
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Spreadsheet Template -->
        <extension>ots
        <mime-type>application/vnd.oasis.opendocument.spreadsheet-template 
    </mime-mapping>
    <mime-mapping>
        <!-- OpenDocument Text Template -->
        <extension>ott
        <mime-type>application/vnd.oasis.opendocument.text-template
    </mime-mapping>
    <mime-mapping>
        <extension>pbm
        <mime-type>image/x-portable-bitmap
    </mime-mapping>
    <mime-mapping>
        <extension>pct
        <mime-type>image/pict
    </mime-mapping>
    <mime-mapping>
        <extension>pdf
        <mime-type>application/pdf
    </mime-mapping>
    <mime-mapping>
        <extension>pgm
        <mime-type>image/x-portable-graymap
    </mime-mapping>
    <mime-mapping>
        <extension>pic
        <mime-type>image/pict
    </mime-mapping>
    <mime-mapping>
        <extension>pict
        <mime-type>image/pict
    </mime-mapping>
    <mime-mapping>
        <extension>pls
        <mime-type>audio/x-scpls
    </mime-mapping>
    <mime-mapping>
        <extension>png
        <mime-type>image/png
    </mime-mapping>
    <mime-mapping>
        <extension>pnm
        <mime-type>image/x-portable-anymap
    </mime-mapping>
    <mime-mapping>
        <extension>pnt
        <mime-type>image/x-macpaint
    </mime-mapping>
    <mime-mapping>
        <extension>ppm
        <mime-type>image/x-portable-pixmap
    </mime-mapping>
    <mime-mapping>
        <extension>ppt
        <mime-type>application/powerpoint
    </mime-mapping>
    <mime-mapping>
        <extension>ps
        <mime-type>application/postscript
    </mime-mapping>
    <mime-mapping>
        <extension>psd
        <mime-type>image/x-photoshop
    </mime-mapping>
    <mime-mapping>
        <extension>qt
        <mime-type>video/quicktime
    </mime-mapping>
    <mime-mapping>
        <extension>qti
        <mime-type>image/x-quicktime
    </mime-mapping>
    <mime-mapping>
        <extension>qtif
        <mime-type>image/x-quicktime
    </mime-mapping>
    <mime-mapping>
        <extension>ras
        <mime-type>image/x-cmu-raster
    </mime-mapping>
    <mime-mapping>
        <extension>rdf
        <mime-type>application/rdf+xml
    </mime-mapping>
    <mime-mapping>
        <extension>rgb
        <mime-type>image/x-rgb
    </mime-mapping>
    <mime-mapping>
        <extension>rm
        <mime-type>application/vnd.rn-realmedia
    </mime-mapping>
    <mime-mapping>
        <extension>roff
        <mime-type>application/x-troff
    </mime-mapping>
    <mime-mapping>
        <extension>rtf
        <mime-type>application/rtf
    </mime-mapping>
    <mime-mapping>
        <extension>rtx
        <mime-type>text/richtext
    </mime-mapping>
    <mime-mapping>
        <extension>sh
        <mime-type>application/x-sh
    </mime-mapping>
    <mime-mapping>
        <extension>shar
        <mime-type>application/x-shar
    </mime-mapping>
<!--
    <mime-mapping>
        <extension>shtml
        <mime-type>text/x-server-parsed-html
    </mime-mapping>
-->
    <mime-mapping>
        <extension>smf
        <mime-type>audio/x-midi
    </mime-mapping>
    <mime-mapping>
        <extension>sit
        <mime-type>application/x-stuffit
    </mime-mapping>
    <mime-mapping>
        <extension>snd
        <mime-type>audio/basic
    </mime-mapping>
    <mime-mapping>
        <extension>src
        <mime-type>application/x-wais-source
    </mime-mapping>
    <mime-mapping>
        <extension>sv4cpio
        <mime-type>application/x-sv4cpio
    </mime-mapping>
    <mime-mapping>
        <extension>sv4crc
        <mime-type>application/x-sv4crc
    </mime-mapping>
    <mime-mapping>
        <extension>swf
        <mime-type>application/x-shockwave-flash
    </mime-mapping>
    <mime-mapping>
        <extension>t
        <mime-type>application/x-troff
    </mime-mapping>
    <mime-mapping>
        <extension>tar
        <mime-type>application/x-tar
    </mime-mapping>
    <mime-mapping>
        <extension>tcl
        <mime-type>application/x-tcl
    </mime-mapping>
    <mime-mapping>
        <extension>tex
        <mime-type>application/x-tex
    </mime-mapping>
    <mime-mapping>
        <extension>texi
        <mime-type>application/x-texinfo
    </mime-mapping>
    <mime-mapping>
        <extension>texinfo
        <mime-type>application/x-texinfo
    </mime-mapping>
    <mime-mapping>
        <extension>tif
        <mime-type>image/tiff
    </mime-mapping>
    <mime-mapping>
        <extension>tiff
        <mime-type>image/tiff
    </mime-mapping>
    <mime-mapping>
        <extension>tr
        <mime-type>application/x-troff
    </mime-mapping>
    <mime-mapping>
        <extension>tsv
        <mime-type>text/tab-separated-values
    </mime-mapping>
    <mime-mapping>
        <extension>txt
        <mime-type>text/plain
    </mime-mapping>
    <mime-mapping>
        <extension>ulw
        <mime-type>audio/basic
    </mime-mapping>
    <mime-mapping>
        <extension>ustar
        <mime-type>application/x-ustar
    </mime-mapping>
    <mime-mapping>
        <extension>vxml
        <mime-type>application/voicexml+xml
    </mime-mapping>
    <mime-mapping>
        <extension>xbm
        <mime-type>image/x-xbitmap
    </mime-mapping>
    <mime-mapping>
        <extension>xht
        <mime-type>application/xhtml+xml
    </mime-mapping>
    <mime-mapping>
        <extension>xhtml
        <mime-type>application/xhtml+xml
    </mime-mapping>
    <mime-mapping>
        <extension>xml
        <mime-type>application/xml
    </mime-mapping>
    <mime-mapping>
        <extension>xpm
        <mime-type>image/x-xpixmap
    </mime-mapping>
    <mime-mapping>
        <extension>xsl
        <mime-type>application/xml
    </mime-mapping>
    <mime-mapping>
        <extension>xslt
        <mime-type>application/xslt+xml
    </mime-mapping>
    <mime-mapping>
        <extension>xul
        <mime-type>application/vnd.mozilla.xul+xml
    </mime-mapping>
    <mime-mapping>
        <extension>xwd
        <mime-type>image/x-xwindowdump
    </mime-mapping>
    <mime-mapping>
        <extension>wav
        <mime-type>audio/x-wav
    </mime-mapping>
    <mime-mapping>
        <extension>svg
        <mime-type>image/svg+xml
    </mime-mapping>
    <mime-mapping>
        <extension>svgz
        <mime-type>image/svg+xml
    </mime-mapping>
    <mime-mapping>
        <extension>vsd
        <mime-type>application/x-visio
    </mime-mapping>
    <mime-mapping>
        <!-- Wireless Bitmap -->
        <extension>wbmp
        <mime-type>image/vnd.wap.wbmp
    </mime-mapping>
    <mime-mapping>
        <!-- WML Source -->
        <extension>wml
        <mime-type>text/vnd.wap.wml
    </mime-mapping>
    <mime-mapping>
        <!-- Compiled WML -->
        <extension>wmlc
        <mime-type>application/vnd.wap.wmlc
    </mime-mapping>
    <mime-mapping>
        <!-- WML Script Source -->
        <extension>wmls
        <mime-type>text/vnd.wap.wmlscript
    </mime-mapping>
    <mime-mapping>
        <!-- Compiled WML Script -->
        <extension>wmlscriptc
        <mime-type>application/vnd.wap.wmlscriptc
    </mime-mapping>
    <mime-mapping>
        <extension>wmv
        <mime-type>video/x-ms-wmv
    </mime-mapping>
    <mime-mapping>
        <extension>wrl
        <mime-type>x-world/x-vrml
    </mime-mapping>
    <mime-mapping>
        <extension>wspolicy
        <mime-type>application/wspolicy+xml
    </mime-mapping>
    <mime-mapping>
        <extension>Z
        <mime-type>application/x-compress
    </mime-mapping>
    <mime-mapping>
        <extension>z
        <mime-type>application/x-compress
    </mime-mapping>
    <mime-mapping>
        <extension>zip
        <mime-type>application/zip
    </mime-mapping>
    <mime-mapping>
        <extension>xls
        <mime-type>application/vnd.ms-excel
    </mime-mapping>
    <mime-mapping>
        <extension>doc
        <mime-type>application/vnd.ms-word
    </mime-mapping>
    <mime-mapping>
        <extension>ppt
        <mime-type>application/vnd.ms-powerpoint
    </mime-mapping>

  <!-- ==================== Default Welcome File List ===================== -->
  <!-- When a request URI refers to a directory, the default servlet looks  -->
  <!-- for a "welcome file" within that directory and, if present,          -->
  <!-- to the corresponding resource URI for display.  If no welcome file   -->
  <!-- is present, the default servlet either serves a directory listing,   -->
  <!-- or returns a 404 status, depending on how it is configured.          -->
  <!--                                                                      -->
  <!-- If you define welcome files in your own application's web.xml        -->
  <!-- deployment descriptor, that list *replaces* the list configured      -->
  <!-- here, so be sure that you include any of the default values that     -->
  <!-- you wish to include.                                                 -->

    <welcome-file-list>
        <welcome-file>index.html
        <welcome-file>index.htm
        <welcome-file>index.jsp
    </welcome-file-list>

</web-app>

Other Tomcat examples (source code examples)

Here is a short list of links related to this Tomcat web.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.