初始提交
diff --git a/tomcat-uid/webapps/docs/appdev/build.xml.txt b/tomcat-uid/webapps/docs/appdev/build.xml.txt
new file mode 100644
index 0000000..ffbb584
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/build.xml.txt
@@ -0,0 +1,512 @@
+<!--
+ 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.
+-->
+
+<!--
+ General purpose build script for web applications and web services,
+ including enhanced support for deploying directly to a Tomcat 6
+ based server.
+
+ This build script assumes that the source code of your web application
+ is organized into the following subdirectories underneath the source
+ code directory from which you execute the build script:
+
+ docs Static documentation files to be copied to
+ the "docs" subdirectory of your distribution.
+
+ src Java source code (and associated resource files)
+ to be compiled to the "WEB-INF/classes"
+ subdirectory of your web application.
+
+ web Static HTML, JSP, and other content (such as
+ image files), including the WEB-INF subdirectory
+ and its configuration file contents.
+-->
+
+
+<!-- A "project" describes a set of targets that may be requested
+ when Ant is executed. The "default" attribute defines the
+ target which is executed if no specific target is requested,
+ and the "basedir" attribute defines the current working directory
+ from which Ant executes the requested task. This is normally
+ set to the current working directory.
+-->
+
+<project name="My Project" default="compile" basedir=".">
+
+
+
+<!-- ===================== Property Definitions =========================== -->
+
+
+<!--
+
+ Each of the following properties are used in the build script.
+ Values for these properties are set by the first place they are
+ defined, from the following list:
+
+ * Definitions on the "ant" command line (ant -Dfoo=bar compile).
+
+ * Definitions from a "build.properties" file in the top level
+ source directory of this application.
+
+ * Definitions from a "build.properties" file in the developer's
+ home directory.
+
+ * Default definitions in this build.xml file.
+
+ You will note below that property values can be composed based on the
+ contents of previously defined properties. This is a powerful technique
+ that helps you minimize the number of changes required when your development
+ environment is modified. Note that property composition is allowed within
+ "build.properties" files as well as in the "build.xml" script.
+
+-->
+
+ <property file="build.properties"/>
+ <property file="${user.home}/build.properties"/>
+
+
+<!-- ==================== File and Directory Names ======================== -->
+
+
+<!--
+
+ These properties generally define file and directory names (or paths) that
+ affect where the build process stores its outputs.
+
+ app.name Base name of this application, used to
+ construct filenames and directories.
+ Defaults to "myapp".
+
+ app.path Context path to which this application should be
+ deployed (defaults to "/" plus the value of the
+ "app.name" property).
+
+ app.version Version number of this iteration of the application.
+
+ build.home The directory into which the "prepare" and
+ "compile" targets will generate their output.
+ Defaults to "build".
+
+ catalina.home The directory in which you have installed
+ a binary distribution of Tomcat 6. This will
+ be used by the "deploy" target.
+
+ dist.home The name of the base directory in which
+ distribution files are created.
+ Defaults to "dist".
+
+ manager.password The login password of a user that is assigned the
+ "manager" role (so that he or she can execute
+ commands via the "/manager" web application)
+
+ manager.url The URL of the "/manager" web application on the
+ Tomcat installation to which we will deploy web
+ applications and web services.
+
+ manager.username The login username of a user that is assigned the
+ "manager" role (so that he or she can execute
+ commands via the "/manager" web application)
+
+-->
+
+ <property name="app.name" value="myapp"/>
+ <property name="app.path" value="/${app.name}"/>
+ <property name="app.version" value="0.1-dev"/>
+ <property name="build.home" value="${basedir}/build"/>
+ <property name="catalina.home" value="../../../.."/> <!-- UPDATE THIS! -->
+ <property name="dist.home" value="${basedir}/dist"/>
+ <property name="docs.home" value="${basedir}/docs"/>
+ <property name="manager.url" value="http://localhost:8080/manager"/>
+ <property name="src.home" value="${basedir}/src"/>
+ <property name="web.home" value="${basedir}/web"/>
+
+
+<!-- ==================== External Dependencies =========================== -->
+
+
+<!--
+
+ Use property values to define the locations of external JAR files on which
+ your application will depend. In general, these values will be used for
+ two purposes:
+ * Inclusion on the classpath that is passed to the Javac compiler
+ * Being copied into the "/WEB-INF/lib" directory during execution
+ of the "deploy" target.
+
+ Because we will automatically include all of the Java classes that Tomcat 6
+ exposes to web applications, we will not need to explicitly list any of those
+ dependencies. You only need to worry about external dependencies for JAR
+ files that you are going to include inside your "/WEB-INF/lib" directory.
+
+-->
+
+<!-- Dummy external dependency -->
+<!--
+ <property name="foo.jar"
+ value="/path/to/foo.jar"/>
+-->
+
+
+<!-- ==================== Compilation Classpath =========================== -->
+
+<!--
+
+ Rather than relying on the CLASSPATH environment variable, Ant includes
+ features that makes it easy to dynamically construct the classpath you
+ need for each compilation. The example below constructs the compile
+ classpath to include the servlet.jar file, as well as the other components
+ that Tomcat makes available to web applications automatically, plus anything
+ that you explicitly added.
+
+-->
+
+ <path id="compile.classpath">
+
+ <!-- Include all JAR files that will be included in /WEB-INF/lib -->
+ <!-- *** CUSTOMIZE HERE AS REQUIRED BY YOUR APPLICATION *** -->
+<!--
+ <pathelement location="${foo.jar}"/>
+-->
+
+ <!-- Include all elements that Tomcat exposes to applications -->
+ <fileset dir="${catalina.home}/bin">
+ <include name="*.jar"/>
+ </fileset>
+ <pathelement location="${catalina.home}/lib"/>
+ <fileset dir="${catalina.home}/lib">
+ <include name="*.jar"/>
+ </fileset>
+
+ </path>
+
+
+
+<!-- ================== Custom Ant Task Definitions ======================= -->
+
+
+<!--
+
+ These properties define custom tasks for the Ant build tool that interact
+ with the "/manager" web application installed with Tomcat 6. Before they
+ can be successfully utilized, you must perform the following steps:
+
+ - Copy the file "lib/catalina-ant.jar" from your Tomcat 6
+ installation into the "lib" directory of your Ant installation.
+
+ - Create a "build.properties" file in your application's top-level
+ source directory (or your user login home directory) that defines
+ appropriate values for the "manager.password", "manager.url", and
+ "manager.username" properties described above.
+
+ For more information about the Manager web application, and the functionality
+ of these tasks, see <http://localhost:8080/tomcat-docs/manager-howto.html>.
+
+-->
+
+ <taskdef resource="org/apache/catalina/ant/catalina.tasks"
+ classpathref="compile.classpath"/>
+
+
+<!-- ==================== Compilation Control Options ==================== -->
+
+<!--
+
+ These properties control option settings on the Javac compiler when it
+ is invoked using the <javac> task.
+
+ compile.debug Should compilation include the debug option?
+
+ compile.deprecation Should compilation include the deprecation option?
+
+ compile.optimize Should compilation include the optimize option?
+
+-->
+
+ <property name="compile.debug" value="true"/>
+ <property name="compile.deprecation" value="false"/>
+ <property name="compile.optimize" value="true"/>
+
+
+
+<!-- ==================== All Target ====================================== -->
+
+<!--
+
+ The "all" target is a shortcut for running the "clean" target followed
+ by the "compile" target, to force a complete recompile.
+
+-->
+
+ <target name="all" depends="clean,compile"
+ description="Clean build and dist directories, then compile"/>
+
+
+
+<!-- ==================== Clean Target ==================================== -->
+
+<!--
+
+ The "clean" target deletes any previous "build" and "dist" directory,
+ so that you can be ensured the application can be built from scratch.
+
+-->
+
+ <target name="clean"
+ description="Delete old build and dist directories">
+ <delete dir="${build.home}"/>
+ <delete dir="${dist.home}"/>
+ </target>
+
+
+
+<!-- ==================== Compile Target ================================== -->
+
+<!--
+
+ The "compile" target transforms source files (from your "src" directory)
+ into object files in the appropriate location in the build directory.
+ This example assumes that you will be including your classes in an
+ unpacked directory hierarchy under "/WEB-INF/classes".
+
+-->
+
+ <target name="compile" depends="prepare"
+ description="Compile Java sources">
+
+ <!-- Compile Java classes as necessary -->
+ <mkdir dir="${build.home}/WEB-INF/classes"/>
+ <javac srcdir="${src.home}"
+ destdir="${build.home}/WEB-INF/classes"
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ optimize="${compile.optimize}">
+ <classpath refid="compile.classpath"/>
+ </javac>
+
+ <!-- Copy application resources -->
+ <copy todir="${build.home}/WEB-INF/classes">
+ <fileset dir="${src.home}" excludes="**/*.java"/>
+ </copy>
+
+ </target>
+
+
+
+<!-- ==================== Dist Target ===================================== -->
+
+
+<!--
+
+ The "dist" target creates a binary distribution of your application
+ in a directory structure ready to be archived in a tar.gz or zip file.
+ Note that this target depends on two others:
+
+ * "compile" so that the entire web application (including external
+ dependencies) will have been assembled
+
+ * "javadoc" so that the application Javadocs will have been created
+
+-->
+
+ <target name="dist" depends="compile,javadoc"
+ description="Create binary distribution">
+
+ <!-- Copy documentation subdirectories -->
+ <mkdir dir="${dist.home}/docs"/>
+ <copy todir="${dist.home}/docs">
+ <fileset dir="${docs.home}"/>
+ </copy>
+
+ <!-- Create application JAR file -->
+ <jar jarfile="${dist.home}/${app.name}-${app.version}.war"
+ basedir="${build.home}"/>
+
+ <!-- Copy additional files to ${dist.home} as necessary -->
+
+ </target>
+
+
+
+<!-- ==================== Install Target ================================== -->
+
+<!--
+
+ The "install" target tells the specified Tomcat 6 installation to dynamically
+ install this web application and make it available for execution. It does
+ *not* cause the existence of this web application to be remembered across
+ Tomcat restarts; if you restart the server, you will need to re-install all
+ this web application.
+
+ If you have already installed this application, and simply want Tomcat to
+ recognize that you have updated Java classes (or the web.xml file), use the
+ "reload" target instead.
+
+ NOTE: This target will only succeed if it is run from the same server that
+ Tomcat is running on.
+
+ NOTE: This is the logical opposite of the "remove" target.
+
+-->
+
+ <target name="install" depends="compile"
+ description="Install application to servlet container">
+
+ <deploy url="${manager.url}"
+ username="${manager.username}"
+ password="${manager.password}"
+ path="${app.path}"
+ localWar="file://${build.home}"/>
+
+ </target>
+
+
+<!-- ==================== Javadoc Target ================================== -->
+
+<!--
+
+ The "javadoc" target creates Javadoc API documentation for the Java
+ classes included in your application. Normally, this is only required
+ when preparing a distribution release, but is available as a separate
+ target in case the developer wants to create Javadocs independently.
+
+-->
+
+ <target name="javadoc" depends="compile"
+ description="Create Javadoc API documentation">
+
+ <mkdir dir="${dist.home}/docs/api"/>
+ <javadoc sourcepath="${src.home}"
+ destdir="${dist.home}/docs/api"
+ packagenames="*">
+ <classpath refid="compile.classpath"/>
+ </javadoc>
+
+ </target>
+
+
+
+<!-- ====================== List Target =================================== -->
+
+<!--
+
+ The "list" target asks the specified Tomcat 6 installation to list the
+ currently running web applications, either loaded at startup time or
+ installed dynamically. It is useful to determine whether or not the
+ application you are currently developing has been installed.
+
+-->
+
+ <target name="list"
+ description="List installed applications on servlet container">
+
+ <list url="${manager.url}"
+ username="${manager.username}"
+ password="${manager.password}"/>
+
+ </target>
+
+
+<!-- ==================== Prepare Target ================================== -->
+
+<!--
+
+ The "prepare" target is used to create the "build" destination directory,
+ and copy the static contents of your web application to it. If you need
+ to copy static files from external dependencies, you can customize the
+ contents of this task.
+
+ Normally, this task is executed indirectly when needed.
+
+-->
+
+ <target name="prepare">
+
+ <!-- Create build directories as needed -->
+ <mkdir dir="${build.home}"/>
+ <mkdir dir="${build.home}/WEB-INF"/>
+ <mkdir dir="${build.home}/WEB-INF/classes"/>
+
+
+ <!-- Copy static content of this web application -->
+ <copy todir="${build.home}">
+ <fileset dir="${web.home}"/>
+ </copy>
+
+ <!-- Copy external dependencies as required -->
+ <!-- *** CUSTOMIZE HERE AS REQUIRED BY YOUR APPLICATION *** -->
+ <mkdir dir="${build.home}/WEB-INF/lib"/>
+<!--
+ <copy todir="${build.home}/WEB-INF/lib" file="${foo.jar}"/>
+-->
+
+ <!-- Copy static files from external dependencies as needed -->
+ <!-- *** CUSTOMIZE HERE AS REQUIRED BY YOUR APPLICATION *** -->
+
+ </target>
+
+
+<!-- ==================== Reload Target =================================== -->
+
+<!--
+
+ The "reload" signals the specified application Tomcat 6 to shut itself down
+ and reload. This can be useful when the web application context is not
+ reloadable and you have updated classes or property files in the
+ /WEB-INF/classes directory or when you have added or updated jar files in the
+ /WEB-INF/lib directory.
+
+ NOTE: The /WEB-INF/web.xml web application configuration file is not reread
+ on a reload. If you have made changes to your web.xml file you must stop
+ then start the web application.
+
+-->
+
+ <target name="reload" depends="compile"
+ description="Reload application on servlet container">
+
+ <reload url="${manager.url}"
+ username="${manager.username}"
+ password="${manager.password}"
+ path="${app.path}"/>
+
+ </target>
+
+
+<!-- ==================== Remove Target =================================== -->
+
+<!--
+
+ The "remove" target tells the specified Tomcat 6 installation to dynamically
+ remove this web application from service.
+
+ NOTE: This is the logical opposite of the "install" target.
+
+-->
+
+ <target name="remove"
+ description="Remove application on servlet container">
+
+ <undeploy url="${manager.url}"
+ username="${manager.username}"
+ password="${manager.password}"
+ path="${app.path}"/>
+
+ </target>
+
+
+</project>
diff --git a/tomcat-uid/webapps/docs/appdev/deployment.html b/tomcat-uid/webapps/docs/appdev/deployment.html
new file mode 100644
index 0000000..e5d7c78
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/deployment.html
@@ -0,0 +1,206 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Application Developer's Guide (6.0.39) - Deployment</title><meta name="author" content="Craig R. McClanahan"><style type="text/css" media="print">
+ .noPrint {display: none;}
+ td#mainBody {width: 100%;}
+ </style></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img src="../images/tomcat.gif" align="right" alt="
+ The Apache Tomcat Servlet/JSP Container
+ " border="0"></a></td><td><h1><font face="arial,helvetica,sanserif">Apache Tomcat 6.0</font></h1><font face="arial,helvetica,sanserif">Version 6.0.39, Jan 27 2014</font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="../images/asf-logo.gif" align="right" alt="Apache Logo" border="0"></a></td></tr></table><table border="0" width="100%" cellspacing="4"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><tr><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="nowrap" class="noPrint"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li></ul><p><strong>Contents</strong></p><ul><li><a href="index.html">Contents</a></li><li><a href="introduction.html">Introduction</a></li><li><a href="installation.html">Installation</a></li><li><a href="deployment.html">Deployment</a></li><li><a href="source.html">Source Code</a></li><li><a href="processes.html">Processes</a></li><li><a href="sample/">Example App</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left" id="mainBody"><h1>Application Developer's Guide</h1><h2>Deployment</h2><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Table of Contents"><!--()--></a><a name="Table_of_Contents"><strong>Table of Contents</strong></a></font></td></tr><tr><td><blockquote>
+<ul><li><a href="#Background">Background</a></li><li><a href="#Standard_Directory_Layout">Standard Directory Layout</a></li><li><a href="#Shared_Library_Files">Shared Library Files</a></li><li><a href="#Web_Application_Deployment_Descriptor">Web Application Deployment Descriptor</a></li><li><a href="#Tomcat_Context_Descriptor">Tomcat Context Descriptor</a></li><li><a href="#Deployment_With_Tomcat_6">Deployment With Tomcat 6</a></li></ul>
+</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Background"><strong>Background</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>Before describing how to organize your source code directories,
+it is useful to examine the runtime organization of a web application.
+Prior to the Servlet API Specification, version 2.2, there was little
+consistency between server platforms. However, servers that conform
+to the 2.2 (or later) specification are required to accept a
+<em>Web Application Archive</em> in a standard format, which is discussed
+further below.</p>
+
+<p>A web application is defined as a hierarchy of directories and files
+in a standard layout. Such a hierarchy can be accessed in its "unpacked"
+form, where each directory and file exists in the filesystem separately,
+or in a "packed" form known as a Web ARchive, or WAR file. The former format
+is more useful during development, while the latter is used when you
+distribute your application to be installed.</p>
+
+<p>The top-level directory of your web application hierarchy is also the
+<em>document root</em> of your application. Here, you will place the HTML
+files and JSP pages that comprise your application's user interface. When the
+system administrator deploys your application into a particular server, he
+or she assigns a <em>context path</em> to your application (a later section
+of this manual describes deployment on Tomcat). Thus, if the
+system administrator assigns your application to the context path
+<code>/catalog</code>, then a request URI referring to
+<code>/catalog/index.html</code> will retrieve the <code>index.html</code>
+file from your document root.</p>
+
+</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Standard Directory Layout"><!--()--></a><a name="Standard_Directory_Layout"><strong>Standard Directory Layout</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>To facilitate creation of a Web Application Archive file in the required
+format, it is convenient to arrange the "executable" files of your web
+application (that is, the files that Tomcat actually uses when executing
+your app) in the same organization as required by the WAR format itself.
+To do this, you will end up with the following contents in your
+application's "document root" directory:</p>
+<ul>
+<li><strong>*.html, *.jsp, etc.</strong> - The HTML and JSP pages, along
+ with other files that must be visible to the client browser (such as
+ JavaScript, stylesheet files, and images) for your application.
+ In larger applications you may choose to divide these files into
+ a subdirectory hierarchy, but for smaller apps, it is generally
+ much simpler to maintain only a single directory for these files.
+ <br><br></li>
+<li><strong>/WEB-INF/web.xml</strong> - The <em>Web Application Deployment
+ Descriptor</em> for your application. This is an XML file describing
+ the servlets and other components that make up your application,
+ along with any initialization parameters and container-managed
+ security constraints that you want the server to enforce for you.
+ This file is discussed in more detail in the following subsection.
+ <br><br></li>
+<li><strong>/WEB-INF/classes/</strong> - This directory contains any Java
+ class files (and associated resources) required for your application,
+ including both servlet and non-servlet classes, that are not combined
+ into JAR files. If your classes are organized into Java packages,
+ you must reflect this in the directory hierarchy under
+ <code>/WEB-INF/classes/</code>. For example, a Java class named
+ <code>com.mycompany.mypackage.MyServlet</code>
+ would need to be stored in a file named
+ <code>/WEB-INF/classes/com/mycompany/mypackage/MyServlet.class</code>.
+ <br><br></li>
+<li><strong>/WEB-INF/lib/</strong> - This directory contains JAR files that
+ contain Java class files (and associated resources) required for your
+ application, such as third party class libraries or JDBC drivers.</li>
+</ul>
+
+<p>When you install an application into Tomcat (or any other
+2.2/2.3-compatible server), the classes in the <code>WEB-INF/classes/</code>
+directory, as well as all classes in JAR files found in the
+<code>WEB-INF/lib/</code> directory, are made visible to other classes
+within your particular web application. Thus, if
+you include all of the required library classes in one of these places (be
+sure to check licenses for redistribution rights for any third party libraries
+you utilize), you will simplify the installation of your web application --
+no adjustment to the system class path (or installation of global library
+files in your server) will be necessary.</p>
+
+<p>Much of this information was extracted from Chapter 9 of the Servlet
+API Specification, version 2.3, which you should consult for more details.</p>
+
+</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Shared Library Files"><!--()--></a><a name="Shared_Library_Files"><strong>Shared Library Files</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>Like most servlet containers, Tomcat 6 also supports mechanisms to install
+library JAR files (or unpacked classes) once, and make them visible to all
+installed web applications (without having to be included inside the web
+application itself). The details of how Tomcat locates and shares such
+classes are described in the
+<a href="../class-loader-howto.html">Class Loader HOW-TO</a> documentation.
+The location commonly used within a Tomcat 6 installation for shared code is
+<strong>$CATALINA_HOME/lib</strong>. JAR files placed here are visible both to
+web applications and internal Tomcat code. This is a good place to put JDBC
+drivers that are required for both your application or internal Tomcat use
+(such as for a JDBCRealm).</p>
+
+<p>Out of the box, a standard Tomcat 6 installation includes a variety
+of pre-installed shared library files, including:</p>
+<ul>
+<li>The <em>Servlet 2.5</em> and <em>JSP 2.1</em> APIs that are fundamental
+ to writing servlets and JavaServer Pages.<br><br></li>
+</ul>
+
+</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Web Application Deployment Descriptor"><!--()--></a><a name="Web_Application_Deployment_Descriptor"><strong>Web Application Deployment Descriptor</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>As mentioned above, the <code>/WEB-INF/web.xml</code> file contains the
+Web Application Deployment Descriptor for your application. As the filename
+extension implies, this file is an XML document, and defines everything about
+your application that a server needs to know (except the <em>context path</em>,
+which is assigned by the system administrator when the application is
+deployed).</p>
+
+<p>The complete syntax and semantics for the deployment descriptor is defined
+in Chapter 13 of the Servlet API Specification, version 2.3. Over time, it
+is expected that development tools will be provided that create and edit the
+deployment descriptor for you. In the meantime, to provide a starting point,
+a <a href="web.xml.txt">basic web.xml file</a>
+is provided. This file includes comments that describe the purpose of each
+included element.</p>
+
+<p><strong>NOTE</strong> - The Servlet Specification includes a Document
+Type Descriptor (DTD) for the web application deployment descriptor, and
+Tomcat 6 enforces the rules defined here when processing your application's
+<code>/WEB-INF/web.xml</code> file. In particular, you <strong>must</strong>
+enter your descriptor elements (such as <code><filter></code>,
+<code><servlet></code>, and <code><servlet-mapping></code> in
+the order defined by the DTD (see Section 13.3).</p>
+
+</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Tomcat Context Descriptor"><!--()--></a><a name="Tomcat_Context_Descriptor"><strong>Tomcat Context Descriptor</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>A /META-INF/context.xml file can be used to define Tomcat specific
+configuration options, such as an access log, data sources, session manager
+configuration and more. This XML file must contain one Context element, which
+will be considered as if it was the child of the Host element corresponding
+to the Host to which the web application is being deployed. The
+<a href="../config/index.html">Tomcat configuration documentation</a> contains
+information on the Context element.</p>
+
+</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Deployment With Tomcat 6"><!--()--></a><a name="Deployment_With_Tomcat_6"><strong>Deployment With Tomcat 6</strong></a></font></td></tr><tr><td><blockquote>
+
+ <blockquote><em>
+ <p>The description below uses the variable name $CATALINA_BASE to refer the
+ base directory against which most relative paths are resolved. If you have
+ not configured Tomcat 6 for multiple instances by setting a CATALINA_BASE
+ directory, then $CATALINA_BASE will be set to the value of $CATALINA_HOME,
+ the directory into which you have installed Tomcat 6.</p>
+ </em></blockquote>
+
+<p>In order to be executed, a web application must be deployed on
+a servlet container. This is true even during development.
+We will describe using Tomcat 6 to provide the execution environment.
+A web application can be deployed in Tomcat by one of the following
+approaches:</p>
+<ul>
+<li><em>Copy unpacked directory hierarchy into a subdirectory in directory
+ <code>$CATALINA_BASE/webapps/</code></em>. Tomcat will assign a
+ context path to your application based on the subdirectory name you
+ choose. We will use this technique in the <code>build.xml</code>
+ file that we construct, because it is the quickest and easiest approach
+ during development. Be sure to restart Tomcat after installing or
+ updating your application.
+ <br><br></li>
+<li><em>Copy the web application archive file into directory
+ <code>$CATALINA_BASE/webapps/</code></em>. When Tomcat is started, it will
+ automatically expand the web application archive file into its unpacked
+ form, and execute the application that way. This approach would typically
+ be used to install an additional application, provided by a third party
+ vendor or by your internal development staff, into an existing
+ Tomcat installation. <strong>NOTE</strong> - If you use this approach,
+ and wish to update your application later, you must both replace the
+ web application archive file <strong>AND</strong> delete the expanded
+ directory that Tomcat created, and then restart Tomcat, in order to reflect
+ your changes.
+ <br><br></li>
+<li><em>Use the Tomcat 6 "Manager" web application to deploy and undeploy
+ web applications</em>. Tomcat 6 includes a web application, deployed
+ by default on context path <code>/manager</code>, that allows you to
+ deploy and undeploy applications on a running Tomcat server without
+ restarting it. See the administrator documentation (TODO: hyperlink)
+ for more information on using the Manager web application.<br><br></li>
+<li><em>Use "Manager" Ant Tasks In Your Build Script</em>. Tomcat 6
+ includes a set of custom task definitions for the <code>Ant</code>
+ build tool that allow you to automate the execution of commands to the
+ "Manager" web application. These tasks are used in the Tomcat deployer.
+ <br><br></li>
+<li><em>Use the Tomcat Deployer</em>. Tomcat 6 includes a packaged tool
+ bundling the Ant tasks, and can be used to automatically precompile JSPs
+ which are part of the web application before deployment to the server.
+ <br><br></li>
+</ul>
+
+<p>Deploying your app on other servlet containers will be specific to each
+container, but all containers compatible with the Servlet API Specification
+(version 2.2 or later) are required to accept a web application archive file.
+Note that other containers are <strong>NOT</strong> required to accept an
+unpacked directory structure (as Tomcat does), or to provide mechanisms for
+shared library files, but these features are commonly available.</p>
+
+</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
+ Copyright © 1999-2014, Apache Software Foundation
+ </em></font></div></td></tr></table></body></html>
\ No newline at end of file
diff --git a/tomcat-uid/webapps/docs/appdev/index.html b/tomcat-uid/webapps/docs/appdev/index.html
new file mode 100644
index 0000000..cf1a2a5
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/index.html
@@ -0,0 +1,47 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Application Developer's Guide (6.0.39) - Table of Contents</title><meta name="author" content="Craig R. McClanahan"><style type="text/css" media="print">
+ .noPrint {display: none;}
+ td#mainBody {width: 100%;}
+ </style></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img src="../images/tomcat.gif" align="right" alt="
+ The Apache Tomcat Servlet/JSP Container
+ " border="0"></a></td><td><h1><font face="arial,helvetica,sanserif">Apache Tomcat 6.0</font></h1><font face="arial,helvetica,sanserif">Version 6.0.39, Jan 27 2014</font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="../images/asf-logo.gif" align="right" alt="Apache Logo" border="0"></a></td></tr></table><table border="0" width="100%" cellspacing="4"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><tr><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="nowrap" class="noPrint"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li></ul><p><strong>Contents</strong></p><ul><li><a href="index.html">Contents</a></li><li><a href="introduction.html">Introduction</a></li><li><a href="installation.html">Installation</a></li><li><a href="deployment.html">Deployment</a></li><li><a href="source.html">Source Code</a></li><li><a href="processes.html">Processes</a></li><li><a href="sample/">Example App</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left" id="mainBody"><h1>Application Developer's Guide</h1><h2>Table of Contents</h2><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Preface"><strong>Preface</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>This manual includes contributions from many members of the Tomcat Project
+developer community. The following authors have provided significant content:
+</p>
+<ul>
+<li>Craig R. McClanahan
+ (<a href="mailto:craigmcc@apache.org">craigmcc@apache.org</a>)</li>
+</ul>
+
+</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Table of Contents"><!--()--></a><a name="Table_of_Contents"><strong>Table of Contents</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>The information presented is divided into the following sections:</p>
+<ul>
+<li><a href="introduction.html"><strong>Introduction</strong></a> -
+ Briefly describes the information covered here, with
+ links and references to other sources of information.</li>
+<li><a href="installation.html"><strong>Installation</strong></a> -
+ Covers acquiring and installing the required software
+ components to use Tomcat for web application development.</li>
+<li><a href="deployment.html"><strong>Deployment Organization</strong></a> -
+ Discusses the standard directory layout for a web application
+ (defined in the Servlet API Specification), the Web Application
+ Deployment Descriptor, and options for integration with Tomcat
+ in your development environment.</li>
+<li><a href="source.html"><strong>Source Organization</strong></a> -
+ Describes a useful approach to organizing the source code
+ directories for your project, and introduces the
+ <code>build.xml</code> used by Ant to manage compilation.</li>
+<li><a href="processes.html"><strong>Development Processes</strong></a> -
+ Provides brief descriptions of typical development processes
+ utilizing the recommended deployment and source organizations.</li>
+<li><a href="sample/"><strong>Example Application</strong></a> -
+ This directory contains a very simple, but functionally complete,
+ "Hello, World" application built according to the principles
+ described in this manual. You can use this application to
+ practice using the described techniques.</li>
+</ul>
+
+</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
+ Copyright © 1999-2014, Apache Software Foundation
+ </em></font></div></td></tr></table></body></html>
\ No newline at end of file
diff --git a/tomcat-uid/webapps/docs/appdev/installation.html b/tomcat-uid/webapps/docs/appdev/installation.html
new file mode 100644
index 0000000..eb219ff
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/installation.html
@@ -0,0 +1,75 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Application Developer's Guide (6.0.39) - Installation</title><meta name="author" content="Craig R. McClanahan"><meta name="author" content="Yoav Shapira"><style type="text/css" media="print">
+ .noPrint {display: none;}
+ td#mainBody {width: 100%;}
+ </style></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img src="../images/tomcat.gif" align="right" alt="
+ The Apache Tomcat Servlet/JSP Container
+ " border="0"></a></td><td><h1><font face="arial,helvetica,sanserif">Apache Tomcat 6.0</font></h1><font face="arial,helvetica,sanserif">Version 6.0.39, Jan 27 2014</font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="../images/asf-logo.gif" align="right" alt="Apache Logo" border="0"></a></td></tr></table><table border="0" width="100%" cellspacing="4"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><tr><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="nowrap" class="noPrint"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li></ul><p><strong>Contents</strong></p><ul><li><a href="index.html">Contents</a></li><li><a href="introduction.html">Introduction</a></li><li><a href="installation.html">Installation</a></li><li><a href="deployment.html">Deployment</a></li><li><a href="source.html">Source Code</a></li><li><a href="processes.html">Processes</a></li><li><a href="sample/">Example App</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left" id="mainBody"><h1>Application Developer's Guide</h1><h2>Installation</h2><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Installation"><strong>Installation</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>In order to use Tomcat 6 for developing web applications, you must first
+install it (and the software it depends on). The required steps are outlined
+in the following subsections.</p>
+
+<table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="JDK"><strong>JDK</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>Tomcat 6.0 was designed to run on J2SE 5.0.
+</p>
+
+<p>Compatible JDKs for many platforms (or links to where they can be found)
+are available at
+<a href="http://java.sun.com/j2se/">http://java.sun.com/j2se/</a>.</p>
+
+</blockquote></td></tr></table>
+
+<table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Tomcat"><strong>Tomcat</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>Binary downloads of the <strong>Tomcat</strong> server are available from
+<a href="http://tomcat.apache.org/download-60.cgi">http://tomcat.apache.org/download-60.cgi</a>.
+This manual assumes you are using the most recent release
+of Tomcat 6. Detailed instructions for downloading and installing
+Tomcat 6 are available <a href="../setup.html">here</a>.</p>
+
+<p>In the remainder of this manual, example shell scripts assume that you have
+set an environment variable <code>CATALINA_HOME</code> that contains the
+pathname to the directory in which Tomcat 6 has been installed. Optionally, if
+Tomcat has been configured for multiple instances, each instance will have its
+own <code>CATALINA_BASE</code> configured.</p>
+
+</blockquote></td></tr></table>
+
+
+<table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Ant"><strong>Ant</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>Binary downloads of the <strong>Ant</strong> build tool are available from
+<a href="http://ant.apache.org/bindownload.cgi">http://ant.apache.org/bindownload.cgi</a>.
+This manual assumes you are using Ant 1.4 or later. The instructions should
+also be compatible with later versions, but this has not been tested.</p>
+
+<p>Download and install Ant from the distribution directory mentioned above.
+Then, add the <code>bin</code> directory of the Ant distribution to your
+<code>PATH</code> environment variable, following the standard practices for
+your operating system platform. Once you have done this, you will be able to
+execute the <code>ant</code> shell command directly.</p>
+
+</blockquote></td></tr></table>
+
+
+<table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="CVS"><strong>CVS</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>Besides the required tools described above, you are strongly encouraged
+to download and install a <em>source code control</em> system, such as the
+<strong>Concurrent Version System</strong> (CVS), to maintain historical
+versions of the source files that make up your web application. Besides
+the server, you will also need appropriate client
+tools to check out source code files, and check in modified versions.</p>
+
+<p>Detailed instructions for installing and using source code control
+applications is beyond the scope of this manual. However, CVS server and
+client tools for many platforms (along with documentation) can be downloaded
+from <a href="http://www.cvshome.org">http://www.cvshome.org</a>.</p>
+
+</blockquote></td></tr></table>
+
+
+</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
+ Copyright © 1999-2014, Apache Software Foundation
+ </em></font></div></td></tr></table></body></html>
\ No newline at end of file
diff --git a/tomcat-uid/webapps/docs/appdev/introduction.html b/tomcat-uid/webapps/docs/appdev/introduction.html
new file mode 100644
index 0000000..9ee848d
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/introduction.html
@@ -0,0 +1,60 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Application Developer's Guide (6.0.39) - Introduction</title><meta name="author" content="Craig R. McClanahan"><style type="text/css" media="print">
+ .noPrint {display: none;}
+ td#mainBody {width: 100%;}
+ </style></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img src="../images/tomcat.gif" align="right" alt="
+ The Apache Tomcat Servlet/JSP Container
+ " border="0"></a></td><td><h1><font face="arial,helvetica,sanserif">Apache Tomcat 6.0</font></h1><font face="arial,helvetica,sanserif">Version 6.0.39, Jan 27 2014</font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="../images/asf-logo.gif" align="right" alt="Apache Logo" border="0"></a></td></tr></table><table border="0" width="100%" cellspacing="4"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><tr><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="nowrap" class="noPrint"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li></ul><p><strong>Contents</strong></p><ul><li><a href="index.html">Contents</a></li><li><a href="introduction.html">Introduction</a></li><li><a href="installation.html">Installation</a></li><li><a href="deployment.html">Deployment</a></li><li><a href="source.html">Source Code</a></li><li><a href="processes.html">Processes</a></li><li><a href="sample/">Example App</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left" id="mainBody"><h1>Application Developer's Guide</h1><h2>Introduction</h2><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Overview"><strong>Overview</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>Congratulations! You've decided to (or been told to) learn how to
+build web applications using servlets and JSP pages, and picked the
+Tomcat server to use for your learning and development. But now what
+do you do?</p>
+
+<p>This manual is a primer covering the basic steps of using Tomcat to
+set up a development environment, organize your source code, and then
+build and test your application. It does not discuss architectures or
+recommended coding practices for web application development,
+or provide in depth instructions on operating the development
+tools that are discussed. References to sources of additional information
+are included in the following subsections.</p>
+
+<p>The discussion in this manual is aimed at developers who will be using
+a text editor along with command line tools to develop and debug their
+applications. As such, the recommendations are fairly generic -- but you
+should easily be able to apply them in either a Windows-based or Unix-based
+development environment. If you are utilizing an Integrated Development
+Environment (IDE) tool, you will need to adapt the advice given here to
+the details of your particular environment.</p>
+
+</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Links"><strong>Links</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>The following links provide access to selected sources of online
+information, documentation, and software that is useful in developing
+web applications with Tomcat.</p>
+<ul>
+<li><a href="http://jcp.org/aboutJava/communityprocess/final/jsr245/index.html">http://jcp.org/aboutJava/communityprocess/final/jsr245/</a> -
+ <i>JavaServer Pages (JSP) Specification, Version 2.1</i>. Describes
+ the programming environment provided by standard implementations
+ of the JavaServer Pages (JSP) technology. In conjunction with
+ the Servlet API Specification (see below), this document describes
+ what a portable API page is allowed to contain. Specific
+ information on scripting (Chapter 9), tag extensions (Chapter 7),
+ and packaging JSP pages (Appendix A) is useful. The Javadoc
+ API Documentation is included in the specification, and with the
+ Tomcat download.<br><br></li>
+<li><a href="http://jcp.org/aboutJava/communityprocess/mrel/jsr154/index2.html">http://jcp.org/aboutJava/communityprocess/mrel/jsr154/index2.html</a> -
+ <i>Servlet API Specification, Version 2.5</i>. Describes the
+ programming environment that must be provided by all servlet
+ containers conforming to this specification. In particular, you
+ will need this document to understand the web application
+ directory structure and deployment file (Chapter 9), methods of
+ mapping request URIs to servlets (Chapter 11), container managed
+ security (Chapter 12), and the syntax of the <code>web.xml</code>
+ Web Application Deployment Descriptor (Chapter 13). The Javadoc
+ API Documentation is included in the specification, and with the
+ Tomcat download.<br><br></li>
+</ul>
+
+</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
+ Copyright © 1999-2014, Apache Software Foundation
+ </em></font></div></td></tr></table></body></html>
\ No newline at end of file
diff --git a/tomcat-uid/webapps/docs/appdev/processes.html b/tomcat-uid/webapps/docs/appdev/processes.html
new file mode 100644
index 0000000..b3a762e
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/processes.html
@@ -0,0 +1,289 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Application Developer's Guide (6.0.39) - Development Processes</title><meta name="author" content="Craig R. McClanahan"><style type="text/css" media="print">
+ .noPrint {display: none;}
+ td#mainBody {width: 100%;}
+ </style></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img src="../images/tomcat.gif" align="right" alt="
+ The Apache Tomcat Servlet/JSP Container
+ " border="0"></a></td><td><h1><font face="arial,helvetica,sanserif">Apache Tomcat 6.0</font></h1><font face="arial,helvetica,sanserif">Version 6.0.39, Jan 27 2014</font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="../images/asf-logo.gif" align="right" alt="Apache Logo" border="0"></a></td></tr></table><table border="0" width="100%" cellspacing="4"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><tr><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="nowrap" class="noPrint"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li></ul><p><strong>Contents</strong></p><ul><li><a href="index.html">Contents</a></li><li><a href="introduction.html">Introduction</a></li><li><a href="installation.html">Installation</a></li><li><a href="deployment.html">Deployment</a></li><li><a href="source.html">Source Code</a></li><li><a href="processes.html">Processes</a></li><li><a href="sample/">Example App</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left" id="mainBody"><h1>Application Developer's Guide</h1><h2>Development Processes</h2><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Table of Contents"><!--()--></a><a name="Table_of_Contents"><strong>Table of Contents</strong></a></font></td></tr><tr><td><blockquote>
+<ul><li><a href="#Development_Processes">Development Processes</a><ol><li><a href="#One-Time_Setup_of_Ant_and_Tomcat_for_Development">One-Time Setup of Ant and Tomcat for Development</a></li><li><a href="#Create_Project_Source_Code_Directory">Create Project Source Code Directory</a></li><li><a href="#Edit_Source_Code_and_Pages">Edit Source Code and Pages</a></li><li><a href="#Build_the_Web_Application">Build the Web Application</a></li><li><a href="#Test_Your_Web_Application">Test Your Web Application</a></li><li><a href="#Creating_a_Release">Creating a Release</a></li></ol></li></ul>
+</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Development Processes"><!--()--></a><a name="Development_Processes"><strong>Development Processes</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>Although application development can take many forms, this manual proposes
+a fairly generic process for creating web applications using Tomcat. The
+following sections highlight the commands and tasks that you, as the developer
+of the code, will perform. The same basic approach works when you have
+multiple programmers involved, as long as you have an appropriate source code
+control system and internal team rules about who is working on what parts
+of the application at any given time.</p>
+
+<p>The task descriptions below assume that you will be using CVS for source
+code control, and that you have already configured access to the appropriate
+CVS repository. Instructions for doing this are beyond the scope of this
+manual. If you are using a different source code control environment, you
+will need to figure out the corresponding commands for your system.</p>
+
+
+<table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="One-Time Setup of Ant and Tomcat for Development"><!--()--></a><a name="One-Time_Setup_of_Ant_and_Tomcat_for_Development"><strong>One-Time Setup of Ant and Tomcat for Development</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>In order to take advantage of the special Ant tasks that interact with the
+<em>Manager</em> web application, you need to perform the following tasks
+once (no matter how many web applications you plan to develop).</p>
+<ul>
+<li><em>Configure the Ant custom tasks</em>. The implementation code for the
+ Ant custom tasks is in a JAR file named
+ <code>$CATALINA_HOME/lib/catalina-ant.jar</code>, which must be
+ copied in to the <code>lib</code> directory of your Ant installation.
+ <br><br></li>
+<li><em>Define one or more Tomcat users</em>. The <em>Manager</em> web
+ application runs under a security constraint that requires a user to be
+ logged in, and have the security role <code>manager</code> assigned to
+ him or her. How such users are defined depends on which Realm you have
+ configured in Tomcat's <code>conf/server.xml</code> file -- see the
+ <a href="../realm-howto.html">Realm Configuration HOW-TO</a> for more
+ information. You may define any number of users (with any username
+ and password that you like) with the <code>manager</code> role.
+ <br><br></li>
+</ul>
+
+</blockquote></td></tr></table>
+
+
+<table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Create Project Source Code Directory"><!--()--></a><a name="Create_Project_Source_Code_Directory"><strong>Create Project Source Code Directory</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>The first step is to create a new project source directory, and customize
+the <code>build.xml</code> and <code>build.properties</code> files you will
+be using. The directory structure is described in <a href="source.html">the
+previous section</a>, or you can use the
+<a href="sample/">sample application</a> as a starting point.</p>
+
+<p>Create your project source directory, and define it within your CVS
+repository. This might be done by a series of commands like this, where
+<code>{project}</code> is the name under which your project should be
+stored in the CVS repository, and {username} is your login username:</p>
+<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
+cd {my home directory}
+mkdir myapp <-- Assumed "project source directory"
+cd myapp
+mkdir docs
+mkdir src
+mkdir web
+mkdir web/WEB-INF
+cvs import -m "Initial Project Creation" {project} \
+ {username} start
+</pre></td><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
+
+<p>Now, to verify that it was created correctly in CVS, we will perform a
+checkout of the new project:</p>
+<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
+cd ..
+mv myapp myapp.bu
+cvs checkout {project}
+</pre></td><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
+
+<p>Next, you will need to create and check in an initial version of the
+<code>build.xml</code> script to be used for development. For getting
+started quickly and easily, base your <code>build.xml</code> on the
+<a href="build.xml.txt">basic build.xml file</a>, included with this manual,
+or code it from scratch.</p>
+<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
+cd {my home directory}
+cd myapp
+emacs build.xml <-- if you want a real editor :-)
+cvs add build.xml
+cvs commit
+</pre></td><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
+
+<p>Until you perform the CVS commit, your changes are local to your own
+development directory. Committing makes those changes visible to other
+developers on your team that are sharing the same CVS repository.</p>
+
+<p>The next step is to customize the Ant <em>properties</em> that are
+named in the <code>build.xml</code> script. This is done by creating a
+file named <code>build.properties</code> in your project's top-level
+directory. The supported properties are listed in the comments inside
+the sample <code>build.xml</code> script. At a minimum, you will generally
+need to define the <code>catalina.home</code> property defining where
+Tomcat 6 is installed, and the manager application username and password.
+You might end up with something like this:</p>
+<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
+# Context path to install this application on
+app.path=/hello
+
+# Tomcat 6 installation directory
+catalina.home=/usr/local/apache-tomcat-6.0
+
+# Manager webapp username and password
+manager.username=myusername
+manager.password=mypassword
+</pre></td><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
+
+<p>In general, you will <strong>not</strong> want to check the
+<code>build.properties</code> file in to the CVS repository, because it
+is unique to each developer's environment.</p>
+
+<p>Now, create the initial version of the web application deployment
+descriptor. You can base <code>web.xml</code> on the
+<a href="web.xml.txt">basic web.xml file</a>, or code it from scratch.</p>
+<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
+cd {my home directory}
+cd myapp/web/WEB-INF
+emacs web.xml
+cvs add web.xml
+cvs commit
+</pre></td><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
+
+Note that this is only an example web.xml file. The full definition
+of the deployment descriptor file is in the
+<a href="http://wiki.apache.org/tomcat/Specifications">Servlet Specification.</a>
+
+</blockquote></td></tr></table>
+
+
+<table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Edit Source Code and Pages"><!--()--></a><a name="Edit_Source_Code_and_Pages"><strong>Edit Source Code and Pages</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>The edit/build/test tasks will generally be your most common activities
+during development and maintenance. The following general principles apply.
+As described in <a href="source.html">Source Organization</a>, newly created
+source files should be located in the appropriate subdirectory, under your
+project source directory.</p>
+
+<p>Whenever you wish to refresh your development directory to reflect the
+work performed by other developers, you will ask CVS to do it for you:</p>
+<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
+cd {my home directory}
+cd myapp
+cvs update -dP
+</pre></td><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
+
+<p>To create a new file, go to the appropriate directory, create the file,
+and register it with CVS. When you are satisfied with it's contents (after
+building and testing is successful), commit the new file to the repository.
+For example, to create a new JSP page:</p>
+<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
+cd {my home directory}
+cd myapp/web <-- Ultimate destination is document root
+emacs mypage.jsp
+cvs add mypage.jsp
+... build and test the application ...
+cvs commit
+</pre></td><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
+
+<p>Java source code that is defined in packages must be organized in a
+directory hierarchy (under the <strong>src/</strong> subdirectory) that
+matches the package names. For example, a Java class named
+<code>com.mycompany.mypackage.MyClass.java</code> should be stored in file
+<code>src/com/mycompany/mypackage/MyClass.java</code>.
+Whenever you create a new subdirectory, don't forget to
+register it with CVS.</p>
+
+<p>To edit an existing source file, you will generally just start editing
+and testing, then commit the changed file when everything works. Although
+CVS can be configured to required you to "check out" or "lock" a file you
+are going to be modifying, this is generally not used.</p>
+
+</blockquote></td></tr></table>
+
+
+<table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Build the Web Application"><!--()--></a><a name="Build_the_Web_Application"><strong>Build the Web Application</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>When you are ready to compile the application, issue the following
+commands (generally, you will want a shell window open that is set to
+the project source directory, so that only the last command is needed):</p>
+<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
+cd {my home directory}
+cd myapp <-- Normally leave a window open here
+ant
+</pre></td><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
+
+<p>The Ant tool will be execute the default "compile" target in your
+<code>build.xml</code> file, which will compile any new or updated Java
+code. If this is the first time you compile after a "build clean",
+it will cause everything to be recompiled.</p>
+
+<p>To force the recompilation of your entire application, do this instead:</p>
+<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
+cd {my home directory}
+cd myapp
+ant all
+</pre></td><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
+
+<p>This is a very good habit immediately before checking in changes, to
+make sure that you have not introduced any subtle problems that Javac's
+conditional checking did not catch.</p>
+
+</blockquote></td></tr></table>
+
+
+<table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Test Your Web Application"><!--()--></a><a name="Test_Your_Web_Application"><strong>Test Your Web Application</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>To test your application, you will want to install it under Tomcat. The
+quickest way to do that is to use the custom Ant tasks that are included in
+the sample <code>build.xml</code> script. Using these commands might follow
+a pattern like this:</p>
+<ul>
+<li><em>Start Tomcat 6 if needed</em>. If Tomcat 6 is not already running,
+ you will need to start it in the usual way.
+ <br><br></li>
+<li><em>Compile your application</em>. Use the <code>ant compile</code>
+ command (or just <code>ant</code>, since this is the default). Make
+ sure that there are no compilation errors.
+ <br><br></li>
+<li><em>Install the application</em>. Use the <code>ant install</code>
+ command. This tells Tomcat to immediately start running your app on
+ the context path defined in the <code>app.path</code> build property.
+ Tomcat does <strong>NOT</strong> have to be restarted for this to
+ take effect.<br><br></li>
+<li><em>Test the application</em>. Using your browser or other testing
+ tools, test the functionality of your application.
+ <br><br></li>
+<li><em>Modify and rebuild as needed</em>. As you discover that changes
+ are required, make those changes in the original <strong>source</strong>
+ files, not in the output build directory, and re-issue the
+ <code>ant compile</code> command. This ensures that your changes will
+ be available to be saved (via <code>cvs commit</code>) later on --
+ the output build directory is deleted and recreated as necessary.
+ <br><br></li>
+<li><em>Reload the application</em>. Tomcat will recognize changes in
+ JSP pages automatically, but it will continue to use the old versions
+ of any servlet or JavaBean classes until the application is reloaded.
+ You can trigger this by executing the <code>ant reload</code> command.
+ <br><br></li>
+<li><em>Remove the application when you re done</em>. When you are through
+ working on this application, you can remove it from live execution by
+ running the <code>ant remove</code> command.</li>
+</ul>
+
+<p>Do not forget to commit your changes to the source code repository when
+you have completed your testing!</p>
+
+</blockquote></td></tr></table>
+
+
+<table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Creating a Release"><!--()--></a><a name="Creating_a_Release"><strong>Creating a Release</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>When you are through adding new functionality, and you've tested everything
+(you DO test, don't you :-), it is time to create the distributable version
+of your web application that can be deployed on the production server. The
+following general steps are required:</p>
+<ul>
+<li>Issue the command <code>ant all</code> from the project source
+ directory, to rebuild everything from scratch one last time.
+ <br><br></li>
+<li>Use the <code>cvs tag</code> command to create an identifier for
+ all of the source files utilized to create this release. This allows
+ you to reliably reconstruct a release (from sources) at a later
+ time.</li>
+<li>Issue the command <code>ant dist</code> to create a distributable
+ web application archive (WAR) file, as well as a JAR file containing
+ the corresponding source code.
+ <br><br></li>
+<li>Package the contents of the <code>dist</code> directory using the
+ <strong>tar</strong> or <strong>zip</strong> utility, according to
+ the standard release procedures used by your organization.</li>
+</ul>
+
+</blockquote></td></tr></table>
+
+
+</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
+ Copyright © 1999-2014, Apache Software Foundation
+ </em></font></div></td></tr></table></body></html>
\ No newline at end of file
diff --git a/tomcat-uid/webapps/docs/appdev/sample/build.xml b/tomcat-uid/webapps/docs/appdev/sample/build.xml
new file mode 100644
index 0000000..ffbb584
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/sample/build.xml
@@ -0,0 +1,512 @@
+<!--
+ 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.
+-->
+
+<!--
+ General purpose build script for web applications and web services,
+ including enhanced support for deploying directly to a Tomcat 6
+ based server.
+
+ This build script assumes that the source code of your web application
+ is organized into the following subdirectories underneath the source
+ code directory from which you execute the build script:
+
+ docs Static documentation files to be copied to
+ the "docs" subdirectory of your distribution.
+
+ src Java source code (and associated resource files)
+ to be compiled to the "WEB-INF/classes"
+ subdirectory of your web application.
+
+ web Static HTML, JSP, and other content (such as
+ image files), including the WEB-INF subdirectory
+ and its configuration file contents.
+-->
+
+
+<!-- A "project" describes a set of targets that may be requested
+ when Ant is executed. The "default" attribute defines the
+ target which is executed if no specific target is requested,
+ and the "basedir" attribute defines the current working directory
+ from which Ant executes the requested task. This is normally
+ set to the current working directory.
+-->
+
+<project name="My Project" default="compile" basedir=".">
+
+
+
+<!-- ===================== Property Definitions =========================== -->
+
+
+<!--
+
+ Each of the following properties are used in the build script.
+ Values for these properties are set by the first place they are
+ defined, from the following list:
+
+ * Definitions on the "ant" command line (ant -Dfoo=bar compile).
+
+ * Definitions from a "build.properties" file in the top level
+ source directory of this application.
+
+ * Definitions from a "build.properties" file in the developer's
+ home directory.
+
+ * Default definitions in this build.xml file.
+
+ You will note below that property values can be composed based on the
+ contents of previously defined properties. This is a powerful technique
+ that helps you minimize the number of changes required when your development
+ environment is modified. Note that property composition is allowed within
+ "build.properties" files as well as in the "build.xml" script.
+
+-->
+
+ <property file="build.properties"/>
+ <property file="${user.home}/build.properties"/>
+
+
+<!-- ==================== File and Directory Names ======================== -->
+
+
+<!--
+
+ These properties generally define file and directory names (or paths) that
+ affect where the build process stores its outputs.
+
+ app.name Base name of this application, used to
+ construct filenames and directories.
+ Defaults to "myapp".
+
+ app.path Context path to which this application should be
+ deployed (defaults to "/" plus the value of the
+ "app.name" property).
+
+ app.version Version number of this iteration of the application.
+
+ build.home The directory into which the "prepare" and
+ "compile" targets will generate their output.
+ Defaults to "build".
+
+ catalina.home The directory in which you have installed
+ a binary distribution of Tomcat 6. This will
+ be used by the "deploy" target.
+
+ dist.home The name of the base directory in which
+ distribution files are created.
+ Defaults to "dist".
+
+ manager.password The login password of a user that is assigned the
+ "manager" role (so that he or she can execute
+ commands via the "/manager" web application)
+
+ manager.url The URL of the "/manager" web application on the
+ Tomcat installation to which we will deploy web
+ applications and web services.
+
+ manager.username The login username of a user that is assigned the
+ "manager" role (so that he or she can execute
+ commands via the "/manager" web application)
+
+-->
+
+ <property name="app.name" value="myapp"/>
+ <property name="app.path" value="/${app.name}"/>
+ <property name="app.version" value="0.1-dev"/>
+ <property name="build.home" value="${basedir}/build"/>
+ <property name="catalina.home" value="../../../.."/> <!-- UPDATE THIS! -->
+ <property name="dist.home" value="${basedir}/dist"/>
+ <property name="docs.home" value="${basedir}/docs"/>
+ <property name="manager.url" value="http://localhost:8080/manager"/>
+ <property name="src.home" value="${basedir}/src"/>
+ <property name="web.home" value="${basedir}/web"/>
+
+
+<!-- ==================== External Dependencies =========================== -->
+
+
+<!--
+
+ Use property values to define the locations of external JAR files on which
+ your application will depend. In general, these values will be used for
+ two purposes:
+ * Inclusion on the classpath that is passed to the Javac compiler
+ * Being copied into the "/WEB-INF/lib" directory during execution
+ of the "deploy" target.
+
+ Because we will automatically include all of the Java classes that Tomcat 6
+ exposes to web applications, we will not need to explicitly list any of those
+ dependencies. You only need to worry about external dependencies for JAR
+ files that you are going to include inside your "/WEB-INF/lib" directory.
+
+-->
+
+<!-- Dummy external dependency -->
+<!--
+ <property name="foo.jar"
+ value="/path/to/foo.jar"/>
+-->
+
+
+<!-- ==================== Compilation Classpath =========================== -->
+
+<!--
+
+ Rather than relying on the CLASSPATH environment variable, Ant includes
+ features that makes it easy to dynamically construct the classpath you
+ need for each compilation. The example below constructs the compile
+ classpath to include the servlet.jar file, as well as the other components
+ that Tomcat makes available to web applications automatically, plus anything
+ that you explicitly added.
+
+-->
+
+ <path id="compile.classpath">
+
+ <!-- Include all JAR files that will be included in /WEB-INF/lib -->
+ <!-- *** CUSTOMIZE HERE AS REQUIRED BY YOUR APPLICATION *** -->
+<!--
+ <pathelement location="${foo.jar}"/>
+-->
+
+ <!-- Include all elements that Tomcat exposes to applications -->
+ <fileset dir="${catalina.home}/bin">
+ <include name="*.jar"/>
+ </fileset>
+ <pathelement location="${catalina.home}/lib"/>
+ <fileset dir="${catalina.home}/lib">
+ <include name="*.jar"/>
+ </fileset>
+
+ </path>
+
+
+
+<!-- ================== Custom Ant Task Definitions ======================= -->
+
+
+<!--
+
+ These properties define custom tasks for the Ant build tool that interact
+ with the "/manager" web application installed with Tomcat 6. Before they
+ can be successfully utilized, you must perform the following steps:
+
+ - Copy the file "lib/catalina-ant.jar" from your Tomcat 6
+ installation into the "lib" directory of your Ant installation.
+
+ - Create a "build.properties" file in your application's top-level
+ source directory (or your user login home directory) that defines
+ appropriate values for the "manager.password", "manager.url", and
+ "manager.username" properties described above.
+
+ For more information about the Manager web application, and the functionality
+ of these tasks, see <http://localhost:8080/tomcat-docs/manager-howto.html>.
+
+-->
+
+ <taskdef resource="org/apache/catalina/ant/catalina.tasks"
+ classpathref="compile.classpath"/>
+
+
+<!-- ==================== Compilation Control Options ==================== -->
+
+<!--
+
+ These properties control option settings on the Javac compiler when it
+ is invoked using the <javac> task.
+
+ compile.debug Should compilation include the debug option?
+
+ compile.deprecation Should compilation include the deprecation option?
+
+ compile.optimize Should compilation include the optimize option?
+
+-->
+
+ <property name="compile.debug" value="true"/>
+ <property name="compile.deprecation" value="false"/>
+ <property name="compile.optimize" value="true"/>
+
+
+
+<!-- ==================== All Target ====================================== -->
+
+<!--
+
+ The "all" target is a shortcut for running the "clean" target followed
+ by the "compile" target, to force a complete recompile.
+
+-->
+
+ <target name="all" depends="clean,compile"
+ description="Clean build and dist directories, then compile"/>
+
+
+
+<!-- ==================== Clean Target ==================================== -->
+
+<!--
+
+ The "clean" target deletes any previous "build" and "dist" directory,
+ so that you can be ensured the application can be built from scratch.
+
+-->
+
+ <target name="clean"
+ description="Delete old build and dist directories">
+ <delete dir="${build.home}"/>
+ <delete dir="${dist.home}"/>
+ </target>
+
+
+
+<!-- ==================== Compile Target ================================== -->
+
+<!--
+
+ The "compile" target transforms source files (from your "src" directory)
+ into object files in the appropriate location in the build directory.
+ This example assumes that you will be including your classes in an
+ unpacked directory hierarchy under "/WEB-INF/classes".
+
+-->
+
+ <target name="compile" depends="prepare"
+ description="Compile Java sources">
+
+ <!-- Compile Java classes as necessary -->
+ <mkdir dir="${build.home}/WEB-INF/classes"/>
+ <javac srcdir="${src.home}"
+ destdir="${build.home}/WEB-INF/classes"
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ optimize="${compile.optimize}">
+ <classpath refid="compile.classpath"/>
+ </javac>
+
+ <!-- Copy application resources -->
+ <copy todir="${build.home}/WEB-INF/classes">
+ <fileset dir="${src.home}" excludes="**/*.java"/>
+ </copy>
+
+ </target>
+
+
+
+<!-- ==================== Dist Target ===================================== -->
+
+
+<!--
+
+ The "dist" target creates a binary distribution of your application
+ in a directory structure ready to be archived in a tar.gz or zip file.
+ Note that this target depends on two others:
+
+ * "compile" so that the entire web application (including external
+ dependencies) will have been assembled
+
+ * "javadoc" so that the application Javadocs will have been created
+
+-->
+
+ <target name="dist" depends="compile,javadoc"
+ description="Create binary distribution">
+
+ <!-- Copy documentation subdirectories -->
+ <mkdir dir="${dist.home}/docs"/>
+ <copy todir="${dist.home}/docs">
+ <fileset dir="${docs.home}"/>
+ </copy>
+
+ <!-- Create application JAR file -->
+ <jar jarfile="${dist.home}/${app.name}-${app.version}.war"
+ basedir="${build.home}"/>
+
+ <!-- Copy additional files to ${dist.home} as necessary -->
+
+ </target>
+
+
+
+<!-- ==================== Install Target ================================== -->
+
+<!--
+
+ The "install" target tells the specified Tomcat 6 installation to dynamically
+ install this web application and make it available for execution. It does
+ *not* cause the existence of this web application to be remembered across
+ Tomcat restarts; if you restart the server, you will need to re-install all
+ this web application.
+
+ If you have already installed this application, and simply want Tomcat to
+ recognize that you have updated Java classes (or the web.xml file), use the
+ "reload" target instead.
+
+ NOTE: This target will only succeed if it is run from the same server that
+ Tomcat is running on.
+
+ NOTE: This is the logical opposite of the "remove" target.
+
+-->
+
+ <target name="install" depends="compile"
+ description="Install application to servlet container">
+
+ <deploy url="${manager.url}"
+ username="${manager.username}"
+ password="${manager.password}"
+ path="${app.path}"
+ localWar="file://${build.home}"/>
+
+ </target>
+
+
+<!-- ==================== Javadoc Target ================================== -->
+
+<!--
+
+ The "javadoc" target creates Javadoc API documentation for the Java
+ classes included in your application. Normally, this is only required
+ when preparing a distribution release, but is available as a separate
+ target in case the developer wants to create Javadocs independently.
+
+-->
+
+ <target name="javadoc" depends="compile"
+ description="Create Javadoc API documentation">
+
+ <mkdir dir="${dist.home}/docs/api"/>
+ <javadoc sourcepath="${src.home}"
+ destdir="${dist.home}/docs/api"
+ packagenames="*">
+ <classpath refid="compile.classpath"/>
+ </javadoc>
+
+ </target>
+
+
+
+<!-- ====================== List Target =================================== -->
+
+<!--
+
+ The "list" target asks the specified Tomcat 6 installation to list the
+ currently running web applications, either loaded at startup time or
+ installed dynamically. It is useful to determine whether or not the
+ application you are currently developing has been installed.
+
+-->
+
+ <target name="list"
+ description="List installed applications on servlet container">
+
+ <list url="${manager.url}"
+ username="${manager.username}"
+ password="${manager.password}"/>
+
+ </target>
+
+
+<!-- ==================== Prepare Target ================================== -->
+
+<!--
+
+ The "prepare" target is used to create the "build" destination directory,
+ and copy the static contents of your web application to it. If you need
+ to copy static files from external dependencies, you can customize the
+ contents of this task.
+
+ Normally, this task is executed indirectly when needed.
+
+-->
+
+ <target name="prepare">
+
+ <!-- Create build directories as needed -->
+ <mkdir dir="${build.home}"/>
+ <mkdir dir="${build.home}/WEB-INF"/>
+ <mkdir dir="${build.home}/WEB-INF/classes"/>
+
+
+ <!-- Copy static content of this web application -->
+ <copy todir="${build.home}">
+ <fileset dir="${web.home}"/>
+ </copy>
+
+ <!-- Copy external dependencies as required -->
+ <!-- *** CUSTOMIZE HERE AS REQUIRED BY YOUR APPLICATION *** -->
+ <mkdir dir="${build.home}/WEB-INF/lib"/>
+<!--
+ <copy todir="${build.home}/WEB-INF/lib" file="${foo.jar}"/>
+-->
+
+ <!-- Copy static files from external dependencies as needed -->
+ <!-- *** CUSTOMIZE HERE AS REQUIRED BY YOUR APPLICATION *** -->
+
+ </target>
+
+
+<!-- ==================== Reload Target =================================== -->
+
+<!--
+
+ The "reload" signals the specified application Tomcat 6 to shut itself down
+ and reload. This can be useful when the web application context is not
+ reloadable and you have updated classes or property files in the
+ /WEB-INF/classes directory or when you have added or updated jar files in the
+ /WEB-INF/lib directory.
+
+ NOTE: The /WEB-INF/web.xml web application configuration file is not reread
+ on a reload. If you have made changes to your web.xml file you must stop
+ then start the web application.
+
+-->
+
+ <target name="reload" depends="compile"
+ description="Reload application on servlet container">
+
+ <reload url="${manager.url}"
+ username="${manager.username}"
+ password="${manager.password}"
+ path="${app.path}"/>
+
+ </target>
+
+
+<!-- ==================== Remove Target =================================== -->
+
+<!--
+
+ The "remove" target tells the specified Tomcat 6 installation to dynamically
+ remove this web application from service.
+
+ NOTE: This is the logical opposite of the "install" target.
+
+-->
+
+ <target name="remove"
+ description="Remove application on servlet container">
+
+ <undeploy url="${manager.url}"
+ username="${manager.username}"
+ password="${manager.password}"
+ path="${app.path}"/>
+
+ </target>
+
+
+</project>
diff --git a/tomcat-uid/webapps/docs/appdev/sample/docs/README.txt b/tomcat-uid/webapps/docs/appdev/sample/docs/README.txt
new file mode 100644
index 0000000..e6d7eab
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/sample/docs/README.txt
@@ -0,0 +1,17 @@
+ 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.
+
+This is a dummy README file for the sample
+web application.
diff --git a/tomcat-uid/webapps/docs/appdev/sample/index.html b/tomcat-uid/webapps/docs/appdev/sample/index.html
new file mode 100644
index 0000000..87e3a61
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/sample/index.html
@@ -0,0 +1,46 @@
+<!--
+ 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.
+-->
+<html>
+<head>
+<meta name="author" content="Ben Souther" />
+<title>Sample Application</title>
+</head>
+<body>
+<h2>Sample Application</h2>
+ <p>
+ The example app has been packaged as a war file and can be downloaded
+ <a href="sample.war">here</a> (Note: make sure your browser doesn't
+ change file extension or append a new one).
+ </p>
+ <p>
+ The easiest way to run this application is simply to move the war file
+ to your <b>CATALINA_HOME/webapps</b> directory. Tomcat will automatically
+ expand and deploy the application for you. You can view it with the
+ following URL (assuming that you're running tomcat on port 8080
+ as is the default):
+ <br />
+ <a href="http://localhost:8080/sample">http://localhost:8080/sample</a>
+ </p>
+ <p>
+ If you just want to browse the contents, you can unpack the war file
+ with the <b>jar</b> command.
+ <source>
+ jar -xvf sample.war
+ </source>
+ </p>
+</body>
+</html>
\ No newline at end of file
diff --git a/tomcat-uid/webapps/docs/appdev/sample/sample.war b/tomcat-uid/webapps/docs/appdev/sample/sample.war
new file mode 100644
index 0000000..0a127e6
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/sample/sample.war
Binary files differ
diff --git a/tomcat-uid/webapps/docs/appdev/sample/src/mypackage/Hello.java b/tomcat-uid/webapps/docs/appdev/sample/src/mypackage/Hello.java
new file mode 100644
index 0000000..8c79077
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/sample/src/mypackage/Hello.java
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+package mypackage;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.Enumeration;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+
+/**
+ * Simple servlet to validate that the Hello, World example can
+ * execute servlets. In the web application deployment descriptor,
+ * this servlet must be mapped to correspond to the link in the
+ * "index.html" file.
+ *
+ * @author Craig R. McClanahan <Craig.McClanahan@eng.sun.com>
+ */
+
+public final class Hello extends HttpServlet {
+
+
+ /**
+ * Respond to a GET request for the content produced by
+ * this servlet.
+ *
+ * @param request The servlet request we are processing
+ * @param response The servlet response we are producing
+ *
+ * @exception IOException if an input/output error occurs
+ * @exception ServletException if a servlet error occurs
+ */
+ public void doGet(HttpServletRequest request,
+ HttpServletResponse response)
+ throws IOException, ServletException {
+
+ response.setContentType("text/html");
+ PrintWriter writer = response.getWriter();
+
+ writer.println("<html>");
+ writer.println("<head>");
+ writer.println("<title>Sample Application Servlet Page</title>");
+ writer.println("</head>");
+ writer.println("<body bgcolor=white>");
+
+ writer.println("<table border=\"0\">");
+ writer.println("<tr>");
+ writer.println("<td>");
+ writer.println("<img src=\"images/tomcat.gif\">");
+ writer.println("</td>");
+ writer.println("<td>");
+ writer.println("<h1>Sample Application Servlet</h1>");
+ writer.println("This is the output of a servlet that is part of");
+ writer.println("the Hello, World application.");
+ writer.println("</td>");
+ writer.println("</tr>");
+ writer.println("</table>");
+
+ writer.println("</body>");
+ writer.println("</html>");
+
+ }
+
+
+}
diff --git a/tomcat-uid/webapps/docs/appdev/sample/web/WEB-INF/web.xml b/tomcat-uid/webapps/docs/appdev/sample/web/WEB-INF/web.xml
new file mode 100644
index 0000000..58daf30
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/sample/web/WEB-INF/web.xml
@@ -0,0 +1,39 @@
+<?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/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <display-name>Hello, World Application</display-name>
+ <description>
+ This is a simple web application with a source code organization
+ based on the recommendations of the Application Developer's Guide.
+ </description>
+
+ <servlet>
+ <servlet-name>HelloServlet</servlet-name>
+ <servlet-class>mypackage.Hello</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>HelloServlet</servlet-name>
+ <url-pattern>/hello</url-pattern>
+ </servlet-mapping>
+
+</web-app>
diff --git a/tomcat-uid/webapps/docs/appdev/sample/web/hello.jsp b/tomcat-uid/webapps/docs/appdev/sample/web/hello.jsp
new file mode 100644
index 0000000..de7f0ea
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/sample/web/hello.jsp
@@ -0,0 +1,39 @@
+<!--
+ 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.
+-->
+<html>
+<head>
+<title>Sample Application JSP Page</title>
+</head>
+<body bgcolor=white>
+
+<table border="0">
+<tr>
+<td align=center>
+<img src="images/tomcat.gif">
+</td>
+<td>
+<h1>Sample Application JSP Page</h1>
+This is the output of a JSP page that is part of the Hello, World
+application.
+</td>
+</tr>
+</table>
+
+<%= new String("Hello!") %>
+
+</body>
+</html>
diff --git a/tomcat-uid/webapps/docs/appdev/sample/web/images/tomcat.gif b/tomcat-uid/webapps/docs/appdev/sample/web/images/tomcat.gif
new file mode 100644
index 0000000..32f7d80
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/sample/web/images/tomcat.gif
Binary files differ
diff --git a/tomcat-uid/webapps/docs/appdev/sample/web/index.html b/tomcat-uid/webapps/docs/appdev/sample/web/index.html
new file mode 100644
index 0000000..7be5ae7
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/sample/web/index.html
@@ -0,0 +1,44 @@
+<!--
+ 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.
+-->
+<html>
+<head>
+<title>Sample "Hello, World" Application</title>
+</head>
+<body bgcolor=white>
+
+<table border="0">
+<tr>
+<td>
+<img src="images/tomcat.gif">
+</td>
+<td>
+<h1>Sample "Hello, World" Application</h1>
+<p>This is the home page for a sample application used to illustrate the
+source directory organization of a web application utilizing the principles
+outlined in the Application Developer's Guide.
+</td>
+</tr>
+</table>
+
+<p>To prove that they work, you can execute either of the following links:
+<ul>
+<li>To a <a href="hello.jsp">JSP page</a>.
+<li>To a <a href="hello">servlet</a>.
+</ul>
+
+</body>
+</html>
diff --git a/tomcat-uid/webapps/docs/appdev/source.html b/tomcat-uid/webapps/docs/appdev/source.html
new file mode 100644
index 0000000..cd682f2
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/source.html
@@ -0,0 +1,287 @@
+<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Application Developer's Guide (6.0.39) - Source Organization</title><meta name="author" content="Craig R. McClanahan"><style type="text/css" media="print">
+ .noPrint {display: none;}
+ td#mainBody {width: 100%;}
+ </style></head><body bgcolor="#ffffff" text="#000000" link="#525D76" alink="#525D76" vlink="#525D76"><table border="0" width="100%" cellspacing="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img src="../images/tomcat.gif" align="right" alt="
+ The Apache Tomcat Servlet/JSP Container
+ " border="0"></a></td><td><h1><font face="arial,helvetica,sanserif">Apache Tomcat 6.0</font></h1><font face="arial,helvetica,sanserif">Version 6.0.39, Jan 27 2014</font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img src="../images/asf-logo.gif" align="right" alt="Apache Logo" border="0"></a></td></tr></table><table border="0" width="100%" cellspacing="4"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><tr><!--LEFT SIDE NAVIGATION--><td width="20%" valign="top" nowrap="nowrap" class="noPrint"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li></ul><p><strong>Contents</strong></p><ul><li><a href="index.html">Contents</a></li><li><a href="introduction.html">Introduction</a></li><li><a href="installation.html">Installation</a></li><li><a href="deployment.html">Deployment</a></li><li><a href="source.html">Source Code</a></li><li><a href="processes.html">Processes</a></li><li><a href="sample/">Example App</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td width="80%" valign="top" align="left" id="mainBody"><h1>Application Developer's Guide</h1><h2>Source Organization</h2><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Table of Contents"><!--()--></a><a name="Table_of_Contents"><strong>Table of Contents</strong></a></font></td></tr><tr><td><blockquote>
+<ul><li><a href="#Directory_Structure">Directory Structure</a><ol><li><a href="#External_Dependencies">External Dependencies</a></li></ol></li><li><a href="#Source_Code_Control">Source Code Control</a></li><li><a href="#BUILD.XML_Configuration_File">BUILD.XML Configuration File</a></li></ul>
+</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Directory Structure"><!--()--></a><a name="Directory_Structure"><strong>Directory Structure</strong></a></font></td></tr><tr><td><blockquote>
+
+ <blockquote><em>
+ <p>The description below uses the variable name $CATALINA_BASE to refer the
+ base directory against which most relative paths are resolved. If you have
+ not configured Tomcat 6 for multiple instances by setting a CATALINA_BASE
+ directory, then $CATALINA_BASE will be set to the value of $CATALINA_HOME,
+ the directory into which you have installed Tomcat 6.</p>
+ </em></blockquote>
+
+<p>A key recommendation of this manual is to separate the directory
+hierarchy containing your source code (described in this section) from
+the directory hierarchy containing your deployable application
+(described in the preceding section). Maintaining this separation has
+the following advantages:</p>
+<ul>
+<li>The contents of the source directories can be more easily administered,
+ moved, and backed up if the "executable" version of the application
+ is not intermixed.
+ <br><br></li>
+<li>Source code control is easier to manage on directories that contain
+ only source files.
+ <br><br></li>
+<li>The files that make up an installable distribution of your
+ application are much easier to select when the deployment
+ hierarchy is separate.</li>
+</ul>
+
+<p>As we will see, the <code>ant</code> development tool makes the creation
+and processing of such directory hierarchies nearly painless.</p>
+
+<p>The actual directory and file hierarchy used to contain the source code
+of an application can be pretty much anything you like. However, the
+following organization has proven to be quite generally applicable, and is
+expected by the example <code>build.xml</code> configuration file that
+is discussed below. All of these components exist under a top level
+<em>project source directory</em> for your application:</p>
+<ul>
+<li><strong>docs/</strong> - Documentation for your application, in whatever
+ format your development team is using.<br><br></li>
+<li><strong>src/</strong> - Java source files that generate the servlets,
+ beans, and other Java classes that are unique to your application.
+ If your source code is organized in packages (<strong>highly</strong>
+ recommended), the package hierarchy should be reflected as a directory
+ structure underneath this directory.<br><br></li>
+<li><strong>web/</strong> - The static content of your web site (HTML pages,
+ JSP pages, JavaScript files, CSS stylesheet files, and images) that will
+ be accessible to application clients. This directory will be the
+ <em>document root</em> of your web application, and any subdirectory
+ structure found here will be reflected in the request URIs required to
+ access those files.<br><br></li>
+<li><strong>web/WEB-INF/</strong> - The special configuration files required
+ for your application, including the web application deployment descriptor
+ (<code>web.xml</code>, defined in the
+ <a href="http://wiki.apache.org/tomcat/Specifications">Servlet Specification</a>),
+ tag library descriptors for custom tag libraries
+ you have created, and other resource files you wish to include within
+ your web application. Even though this directory appears to be a
+ subdirectory of your <em>document root</em>, the Servlet Specification
+ prohibits serving the contents of this directory (or any file it contains)
+ directly to a client request. Therefore, this is a good place to store
+ configuration information that is sensitive (such as database connection
+ usernames and passwords), but is required for your application to
+ operate successfully.</li>
+</ul>
+
+<p>During the development process, two additional directories will be
+created on a temporary basis:</p>
+<ul>
+<li><strong>build/</strong> - When you execute a default build
+ (<code>ant</code>), this directory will contain an exact image
+ of the files in the web application archive for this application.
+ Tomcat 6 allows you to deploy an application in an unpacked
+ directory like this, either by copying it to the
+ <code>$CATALINA_BASE/webapps</code> directory, or by <em>installing</em>
+ it via the "Manager" web application. The latter approach is very
+ useful during development, and will be illustrated below.
+ <br><br></li>
+<li><strong>dist/</strong> - When you execute the <code>ant dist</code>
+ target, this directory will be created. It will create an exact image
+ of the binary distribution for your web application, including an license
+ information, documentation, and README files that you have prepared.</li>
+</ul>
+
+<p>Note that these two directories should <strong>NOT</strong> be archived in
+your source code control system, because they are deleted and recreated (from
+scratch) as needed during development. For that reason, you should not edit
+any source files in these directories if you want to maintain a permanent
+record of the changes, because the changes will be lost the next time that a
+build is performed.</p>
+
+ <table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#828DA6"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="External Dependencies"><!--()--></a><a name="External_Dependencies"><strong>External Dependencies</strong></a></font></td></tr><tr><td><blockquote>
+
+ <p>What do you do if your application requires JAR files (or other
+ resources) from external projects or packages? A common example is that
+ you need to include a JDBC driver in your web application, in order to
+ operate.</p>
+
+ <p>Different developers take different approaches to this problem.
+ Some will encourage checking a copy of the JAR files you depend on into
+ the source code control archives for every application that requires those
+ JAR files. However, this can cause significant management issues when you
+ use the same JAR in many applications - particular when faced with a need
+ to upgrade to a different version of that JAR file.</p>
+
+ <p>Therefore, this manual recommends that you <strong>NOT</strong> store
+ a copy of the packages you depend on inside the source control archives
+ of your applications. Instead, the external dependencies should be
+ integrated as part of the process of <strong>building</strong> your
+ application. In that way, you can always pick up the appropriate version
+ of the JAR files from wherever your development system administrator has
+ installed them, without having to worry about updating your application
+ every time the version of the dependent JAR file is changed.</p>
+
+ <p>In the example Ant <code>build.xml</code> file, we will demonstrate
+ how to define <em>build properties</em> that let you configure the locations
+ of the files to be copied, without having to modify <code>build.xml</code>
+ when these files change. The build properties used by a particular
+ developer can be customized on a per-application basis, or defaulted to
+ "standard" build properties stored in the developer's home directory.</p>
+
+ <p>In many cases, your development system administrator will have already
+ installed the required JAR files into the <code>lib</code> directory of Tomcat.
+ If this has been done, you need
+ to take no actions at all - the example <code>build.xml</code> file
+ automatically constructs a compile classpath that includes these files.</p>
+
+ </blockquote></td></tr></table>
+
+</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="Source Code Control"><!--()--></a><a name="Source_Code_Control"><strong>Source Code Control</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>As mentioned earlier, it is highly recommended that you place all of the
+source files that comprise your application under the management of a
+source code control system like the Concurrent Version System (CVS). If you
+elect to do this, every directory and file in the source hierarchy should be
+registered and saved -- but none of the generated files. If you register
+binary format files (such as images or JAR libraries), be sure to indicate
+this to your source code control system.</p>
+
+<p>We recommended (in the previous section) that you should not store the
+contents of the <code>build/</code> and <code>dist/</code> directories
+created by your development process in the source code control system. An
+easy way to tell CVS to ignore these directories is to create a file named
+<code>.cvsignore</code> (note the leading period) in your top-level source
+directory, with the following contents:</p>
+<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
+build
+dist
+build.properties
+</pre></td><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
+
+<p>The reason for mentioning <code>build.properties</code> here will be
+explained in the <a href="processes.html">Processes</a> section.</p>
+
+<p>Detailed instructions for your source code control environment are beyond
+the scope of this manual. However, the following steps are followed when
+using a command-line CVS client:</p>
+<ul>
+<li>To refresh the state of your source code to that stored in the
+ the source repository, go to your project source directory, and
+ execute <code>cvs update -dP</code>.
+ <br><br></li>
+<li>When you create a new subdirectory in the source code hierarchy, register
+ it in CVS with a command like <code>cvs add {subdirname}</code>.
+ <br><br></li>
+<li>When you first create a new source code file, navigate to the directory
+ that contains it, and register the new file with a command like
+ <code>cvs add {filename}</code>.
+ <br><br></li>
+<li>If you no longer need a particular source code file, navigate to the
+ containing directory and remove the file. Then, deregister it in CVS
+ with a command like <code>cvs remove {filename}</code>.
+ <br><br></li>
+<li>While you are creating, modifying, and deleting source files, changes
+ are not yet reflected in the server repository. To save your changes in
+ their current state, go to the project source directory
+ and execute <code>cvs commit</code>. You will be asked to write a brief
+ description of the changes you have just completed, which will be stored
+ with the new version of any updated source file.</li>
+</ul>
+
+<p>CVS, like other source code control systems, has many additional features
+(such as the ability to tag the files that made up a particular release, and
+support for multiple development branches that can later be merged). See the
+links and references in the <a href="introduction.html">Introduction</a> for
+more information.</p>
+
+</blockquote></td></tr></table><table border="0" cellspacing="0" cellpadding="2"><tr><td bgcolor="#525D76"><font color="#ffffff" face="arial,helvetica.sanserif"><a name="BUILD.XML Configuration File"><!--()--></a><a name="BUILD.XML_Configuration_File"><strong>BUILD.XML Configuration File</strong></a></font></td></tr><tr><td><blockquote>
+
+<p>We will be using the <strong>ant</strong> tool to manage the compilation of
+our Java source code files, and creation of the deployment hierarchy. Ant
+operates under the control of a build file, normally called
+<code>build.xml</code>, that defines the processing steps required. This
+file is stored in the top-level directory of your source code hierarchy, and
+should be checked in to your source code control system.</p>
+
+<p>Like a Makefile, the <code>build.xml</code> file provides several
+"targets" that support optional development activities (such as creating
+the associated Javadoc documentation, erasing the deployment home directory
+so you can build your project from scratch, or creating the web application
+archive file so you can distribute your application. A well-constructed
+<code>build.xml</code> file will contain internal documentation describing
+the targets that are designed for use by the developer, versus those targets
+used internally. To ask Ant to display the project documentation, change to
+the directory containing the <code>build.xml</code> file and type:</p>
+<div align="left"><table cellspacing="4" cellpadding="0" border="0"><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#ffffff" height="1"><pre>
+ant -projecthelp
+</pre></td><td bgcolor="#023264" width="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr><tr><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td><td bgcolor="#023264" width="1" height="1"><img src="../images/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"></td></tr></table></div>
+
+<p>To give you a head start, a <a href="build.xml.txt">basic build.xml file</a>
+is provided that you can customize and install in the project source directory
+for your application. This file includes comments that describe the various
+targets that can be executed. Briefly, the following targets are generally
+provided:</p>
+<ul>
+<li><strong>clean</strong> - This target deletes any existing
+ <code>build</code> and <code>dist</code> directories, so that they
+ can be reconstructed from scratch. This allows you to guarantee that
+ you have not made source code modifications that will result in
+ problems at runtime due to not recompiling all affected classes.
+ <br><br></li>
+<li><strong>compile</strong> - This target is used to compile any source code
+ that has been changed since the last time compilation took place. The
+ resulting class files are created in the <code>WEB-INF/classes</code>
+ subdirectory of your <code>build</code> directory, exactly where the
+ structure of a web application requires them to be. Because
+ this command is executed so often during development, it is normally
+ made the "default" target so that a simple <code>ant</code> command will
+ execute it.
+ <br><br></li>
+<li><strong>all</strong> - This target is a short cut for running the
+ <code>clean</code> target, followed by the <code>compile</code> target.
+ Thus, it guarantees that you will recompile the entire application, to
+ ensure that you have not unknowingly introduced any incompatible changes.
+ <br><br></li>
+<li><strong>javadoc</strong> - This target creates Javadoc API documentation
+ for the Java classes in this web application. The example
+ <code>build.xml</code> file assumes you want to include the API
+ documentation with your app distribution, so it generates the docs
+ in a subdirectory of the <code>dist</code> directory. Because you normally
+ do not need to generate the Javadocs on every compilation, this target is
+ usually a dependency of the <code>dist</code> target, but not of the
+ <code>compile</code> target.
+ <br><br></li>
+<li><strong>dist</strong> - This target creates a distribution directory for
+ your application, including any required documentation, the Javadocs for
+ your Java classes, and a web application archive (WAR) file that will be
+ delivered to system administrators who wish to install your application.
+ Because this target also depends on the <code>deploy</code> target, the
+ web application archive will have also picked up any external dependencies
+ that were included at deployment time.</li>
+</ul>
+
+<p>For interactive development and testing of your web application using
+Tomcat 6, the following additional targets are defined:</p>
+<ul>
+<li><strong>install</strong> - Tell the currently running Tomcat 6 to make
+ the application you are developing immediately available for execution
+ and testing. This action does not require Tomcat 6 to be restarted, but
+ it is also not remembered after Tomcat is restarted the next time.
+ <br><br></li>
+<li><strong>reload</strong> - Once the application is installed, you can
+ continue to make changes and recompile using the <code>compile</code>
+ target. Tomcat 6 will automatically recognize changes made to JSP pages,
+ but not to servlet or JavaBean classes - this command will tell Tomcat
+ to restart the currently installed application so that such changes are
+ recognized.
+ <br><br></li>
+<li><strong>remove</strong> - When you have completed your development and
+ testing activities, you can optionally tell Tomcat 6 to remove this
+ application from service.
+ </li>
+</ul>
+
+<p>Using the development and testing targets requires some additional
+one-time setup that is described on the next page.</p>
+
+</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr noshade="noshade" size="1"></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font color="#525D76" size="-1"><em>
+ Copyright © 1999-2014, Apache Software Foundation
+ </em></font></div></td></tr></table></body></html>
\ No newline at end of file
diff --git a/tomcat-uid/webapps/docs/appdev/web.xml.txt b/tomcat-uid/webapps/docs/appdev/web.xml.txt
new file mode 100644
index 0000000..42555f0
--- /dev/null
+++ b/tomcat-uid/webapps/docs/appdev/web.xml.txt
@@ -0,0 +1,166 @@
+<?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.
+-->
+
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+
+
+ <!-- General description of your web application -->
+
+ <display-name>My Web Application</display-name>
+ <description>
+ This is version X.X of an application to perform
+ a wild and wonderful task, based on servlets and
+ JSP pages. It was written by Dave Developer
+ (dave@mycompany.com), who should be contacted for
+ more information.
+ </description>
+
+
+ <!-- Context initialization parameters that define shared
+ String constants used within your application, which
+ can be customized by the system administrator who is
+ installing your application. The values actually
+ assigned to these parameters can be retrieved in a
+ servlet or JSP page by calling:
+
+ String value =
+ getServletContext().getInitParameter("name");
+
+ where "name" matches the <param-name> element of
+ one of these initialization parameters.
+
+ You can define any number of context initialization
+ parameters, including zero.
+ -->
+
+ <context-param>
+ <param-name>webmaster</param-name>
+ <param-value>myaddress@mycompany.com</param-value>
+ <description>
+ The EMAIL address of the administrator to whom questions
+ and comments about this application should be addressed.
+ </description>
+ </context-param>
+
+
+ <!-- Servlet definitions for the servlets that make up
+ your web application, including initialization
+ parameters. With Tomcat, you can also send requests
+ to servlets not listed here with a request like this:
+
+ http://localhost:8080/{context-path}/servlet/{classname}
+
+ but this usage is not guaranteed to be portable. It also
+ makes relative references to images and other resources
+ required by your servlet more complicated, so defining
+ all of your servlets (and defining a mapping to them with
+ a servlet-mapping element) is recommended.
+
+ Servlet initialization parameters can be retrieved in a
+ servlet or JSP page by calling:
+
+ String value =
+ getServletConfig().getInitParameter("name");
+
+ where "name" matches the <param-name> element of
+ one of these initialization parameters.
+
+ You can define any number of servlets, including zero.
+ -->
+
+ <servlet>
+ <servlet-name>controller</servlet-name>
+ <description>
+ This servlet plays the "controller" role in the MVC architecture
+ used in this application. It is generally mapped to the ".do"
+ filename extension with a servlet-mapping element, and all form
+ submits in the app will be submitted to a request URI like
+ "saveCustomer.do", which will therefore be mapped to this servlet.
+
+ The initialization parameter names for this servlet are the
+ "servlet path" that will be received by this servlet (after the
+ filename extension is removed). The corresponding value is the
+ name of the action class that will be used to process this request.
+ </description>
+ <servlet-class>com.mycompany.mypackage.ControllerServlet</servlet-class>
+ <init-param>
+ <param-name>listOrders</param-name>
+ <param-value>com.mycompany.myactions.ListOrdersAction</param-value>
+ </init-param>
+ <init-param>
+ <param-name>saveCustomer</param-name>
+ <param-value>com.mycompany.myactions.SaveCustomerAction</param-value>
+ </init-param>
+ <!-- Load this servlet at server startup time -->
+ <load-on-startup>5</load-on-startup>
+ </servlet>
+
+ <servlet>
+ <servlet-name>graph</servlet-name>
+ <description>
+ This servlet produces GIF images that are dynamically generated
+ graphs, based on the input parameters included on the request.
+ It is generally mapped to a specific request URI like "/graph".
+ </description>
+ </servlet>
+
+
+ <!-- Define mappings that are used by the servlet container to
+ translate a particular request URI (context-relative) to a
+ particular servlet. The examples below correspond to the
+ servlet descriptions above. Thus, a request URI like:
+
+ http://localhost:8080/{contextpath}/graph
+
+ will be mapped to the "graph" servlet, while a request like:
+
+ http://localhost:8080/{contextpath}/saveCustomer.do
+
+ will be mapped to the "controller" servlet.
+
+ You may define any number of servlet mappings, including zero.
+ It is also legal to define more than one mapping for the same
+ servlet, if you wish to.
+ -->
+
+ <servlet-mapping>
+ <servlet-name>controller</servlet-name>
+ <url-pattern>*.do</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>graph</servlet-name>
+ <url-pattern>/graph</url-pattern>
+ </servlet-mapping>
+
+
+ <!-- Define the default session timeout for your application,
+ in minutes. From a servlet or JSP page, you can modify
+ the timeout for a particular session dynamically by using
+ HttpSession.getMaxInactiveInterval(). -->
+
+ <session-config>
+ <session-timeout>30</session-timeout> <!-- 30 minutes -->
+ </session-config>
+
+
+</web-app>