craigmcc    01/10/25 09:36:06

  Modified:    .        BUILDING.txt build.properties.sample
               webapps  build.xml
  Added:       webapps/admin admin.xml build.xml error.jsp footer.jsp
                        header.jsp index.jsp login.jsp
               webapps/admin/WEB-INF struts-config.xml web.xml
  Log:
  Initial check-in of the infrastructure for the Admin/Config web
  application.  There is no UI functionality yet -- a prototype will be
  available soon for feedback before that development effort begins.
  
  (In the absence of any further discussion on TOMCAT-DEV about the idea of
  using a separate repository, I went ahead and checked it in to
  jakarta-tomcat-4.0 HEAD branch for development convenience -- it can be
  moved later if approproate.)
  
  Revision  Changes    Path
  1.12      +22 -6     jakarta-tomcat-4.0/BUILDING.txt
  
  Index: BUILDING.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/BUILDING.txt,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- BUILDING.txt      2001/10/17 00:44:01     1.11
  +++ BUILDING.txt      2001/10/25 16:36:05     1.12
  @@ -1,4 +1,4 @@
  -$Id: BUILDING.txt,v 1.11 2001/10/17 00:44:01 craigmcc Exp $
  +$Id: BUILDING.txt,v 1.12 2001/10/25 16:36:05 craigmcc Exp $
   
   
                  Building The Tomcat 4.0 Servlet/JSP Container
  @@ -179,9 +179,9 @@
     distribution resides in its own directory.
   
   
  -(9) Steps (10)-(18) are optional, but are necessary to build a complete binary
  +(9) Steps (10)-(19) are optional, but are necessary to build a complete binary
       distribution of Tomcat 4.0. Set the "full.dist" property to "on" in the
  -    build.properties file (see step (19)) to build a complete distribution.
  +    build.properties file (see step (20)) to build a complete distribution.
       Regular contributors to Tomcat are encouraged to use the complete build 
       option.
   
  @@ -262,8 +262,24 @@
     own subdirectory.
   
   
  -(17) Download and Install the Tyrex Data Source Package
  +(17) Download and Install the Struts Binary Distribution
   
  +* Download a binary distribution of Struts 1.0 from:
  +
  +    http://jakarta.apache.org/builds/jakarta-struts/release/1.0/
  +
  +  On a Windows platform, you will need:
  +    jakarta-struts-1.0.zip
  +
  +  On a Unix platform, you will need:
  +    jakarta-struts-1.0.tar.gz
  +
  +* Unpack the binary distribution into a convenient location so that the
  +  distribution resides in its own directory.
  +
  +
  +(18) Download and Install the Tyrex Data Source Package
  +
   NOTE:  This step is only required if you wish to build the Tyrex connection
   pool implementation for JNDI-accessed data sources.
   
  @@ -275,7 +291,7 @@
     own subdirectory.
   
   
  -(18) Download and Install the JUnit Testing Package (OPTIONAL)
  +(19) Download and Install the JUnit Testing Package (OPTIONAL)
   
   NOTE:  This step is only required if you wish to build and execute the unit
   tests that are part of the Tomcat 4.0 source base.
  @@ -288,7 +304,7 @@
     own subdirectory.
   
   
  -(19) Customize Build Properties For This Subproject
  +(20) Customize Build Properties For This Subproject
   
   Most Jakarta subprojects allow you to customize Ant properties (with default
   values defined in the "build.xml" file.  This is done by creating a text file
  
  
  
  1.19      +6 -1      jakarta-tomcat-4.0/build.properties.sample
  
  Index: build.properties.sample
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/build.properties.sample,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- build.properties.sample   2001/10/17 00:44:01     1.18
  +++ build.properties.sample   2001/10/25 16:36:05     1.19
  @@ -6,7 +6,7 @@
   # modules that Tomcat depends on.  Copy this file to "build.properties"
   # in the top-level source directory, and customize it as needed.
   #
  -# $Id: build.properties.sample,v 1.18 2001/10/17 00:44:01 craigmcc Exp $
  +# $Id: build.properties.sample,v 1.19 2001/10/25 16:36:05 craigmcc Exp $
   # -----------------------------------------------------------------------------
   
   
  @@ -124,6 +124,11 @@
   junit.lib=${junit.home}
   junit.jar=${junit.lib}/junit.jar
   
  +
  +# ----- Struts, version 1.0 or later -----
  +struts.home=${base.path}/jakarta-struts-1.0
  +struts.lib=${struts.home}/lib
  +struts.jar=${struts.lib}/struts.jar
   
   # ----- Tyrex Data Source, version 0.9.7 -----
   tyrex.home=${base.path}/tyrex-0.9.7.0
  
  
  
  1.19      +17 -2     jakarta-tomcat-4.0/webapps/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/build.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- build.xml 2001/10/04 05:51:38     1.18
  +++ build.xml 2001/10/25 16:36:05     1.19
  @@ -33,6 +33,10 @@
       <ant dir="${basedir}/ROOT" target="dist"/>
     </target>
   
  +  <target name="admin">
  +    <ant dir="${basedir}/admin" target="dist"/>
  +  </target>
  +
     <target name="examples">
       <ant dir="${basedir}/examples" target="dist"/>
     </target>
  @@ -52,7 +56,7 @@
   
     <!-- ================= BUILD: Compile Server Components ================= -->
     <!-- Update the depends list for each subproject -->
  -  <target name="build" 
depends="build-prepare,ROOT,examples,manager,tomcat-docs,webdav"/>
  +  <target name="build" 
depends="build-prepare,ROOT,admin,examples,manager,tomcat-docs,webdav"/>
   
   
     <!-- ======================= BUILD: Clean Directory ===================== -->
  @@ -68,10 +72,21 @@
     <!-- ================= DEPLOY: Deploy Webapps Projects ================== -->
     <target name="deploy" depends="dist"
      description="Build and deploy Webapps component">
  +
  +    <!-- General Purpose Applications -->
       <mkdir dir="${webapps.deploy}/webapps"/>
       <copy todir="${webapps.deploy}/webapps">
  -      <fileset dir="${webapps.build}" />
  +      <fileset dir="${webapps.build}" excludes="admin/**"/>
  +    </copy>
  +
  +    <!-- Administrative Applications -->
  +    <mkdir     dir="${webapps.deploy}/server/webapps"/>
  +    <mkdir     dir="${webapps.deploy}/server/webapps/admin"/>
  +    <copy    todir="${webapps.deploy}/server/webapps/admin">
  +      <fileset dir="${webapps.build}/admin" excludes="admin.xml"/>
       </copy>
  +    <copy    todir="${webapps.deploy}/webapps"
  +              file="${webapps.build}/admin/admin.xml"/>
     </target>
   
   
  
  
  
  1.1                  jakarta-tomcat-4.0/webapps/admin/admin.xml
  
  Index: admin.xml
  ===================================================================
  <!--
  
      Context configuration file for the Tomcat Administration Web App
  
      $Id: admin.xml,v 1.1 2001/10/25 16:36:05 craigmcc Exp $
  
  -->
  
  
  <Context path="/admin" docBase="../server/webapps/admin"
          debug="0" privileged="false">
  
    <Logger className="org.apache.catalina.logger.FileLogger"
               prefix="localhost_admin_log." suffix=".txt"
            timestamp="true"/>
  
  </Context>
  
  
  
  1.1                  jakarta-tomcat-4.0/webapps/admin/build.xml
  
  Index: build.xml
  ===================================================================
  <project name="admin" default="build-main" basedir=".">
  
  
    <!-- ===================== Initialize Property Values =================== -->
  
    <!-- See "build.properties.sample" in the top level directory for all     -->
    <!-- property values you must customize for successful building!!!        -->
    <property file="build.properties"/>
    <property file="../build.properties"/>
    <property file="../../build.properties"/>
    <property file="${user.home}/build.properties"/>
  
    <!-- Build Defaults -->
    <property name="build.compiler"  value="classic"/>
    <property name="webapps.build"   value="${basedir}/../build"/>
    <property name="webapps.dist"    value="${basedir}/../dist"/>
    <property name="webapp.name"     value="admin"/>
  
    <!-- Construct Admin classpath -->
    <path id="admin.classpath">
      <pathelement location="${jmxri.jar}"/>
      <pathelement location="${servlet.jar}"/>
      <pathelement location="${struts.jar}"/>
    </path>
  
  
    <!-- =================== BUILD: Set compile flags ======================= -->
    <target name="flags">
  
      <!-- JDK flags -->
      <available property="jdk.1.2.present" classname="java.util.HashMap" />
      <available property="jdk.1.3.present" 
       classname="java.lang.reflect.Proxy" />
      <available property="jdk.1.4.present" classname="java.nio.Buffer" />
  
      <!-- Ant flags -->
      <available property="style.available"
       classname="org.apache.tools.ant.taskdefs.optional.TraXLiaison" />
  
      <!-- Class availability flags -->
      <condition property="jaxp.present">
        <and>
          <available classname="javax.xml.parsers.SAXParser"
           classpath="${xerces.jar}" />
          <available classname="org.xml.sax.ContentHandler"
           classpath="${xerces.jar}" />
        </and>
      </condition>
      <available property="jmx.present"
       classname="javax.management.MBeanServer"
       classpath="${jmxri.jar}" />
      <available property="servlet.present"
       classname="javax.servlet.Servlet"
       classpath="${servlet.jar}" />
      <available property="struts.present"
       classname="org.apache.struts.action.ActionForm"
       classpath="${struts.jar}" />
  
      <!-- JAR files availability flags -->
      <available property="jmxri.jar.present"   file="${jmxri.jar}" />
      <available property="servlet.jar.present" file="${servlet.jar}" />
      <available property="struts.jar.present"  file="${struts.jar}" />
  
      <!-- Conditional compilation flags (determined from the flags above) -->
      <condition property="compile.admin">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <and>
            <equals arg1="${struts.present}" arg2="true" />
            <equals arg1="${jmx.present}" arg2="true" />
            <available file="${struts.lib}/struts-bean.tld" />
            <available file="${struts.lib}/struts-html.tld" />
            <available file="${struts.lib}/struts-logic.tld" />
          </and>
        </or>
      </condition>
  
      <!-- Conditional copy flags (determined from the flags above) -->
      <condition property="copy.struts.jar">
        <or>
          <equals arg1="${full.dist}" arg2="on" />
          <equals arg1="${struts.jar.present}" arg2="true" />
        </or>
      </condition>
  
    </target>
  
  
    <!-- =================== BUILD: Set compile flags ======================= -->
    <target name="flags.display" depends="flags" unless="flags.hide">
  
      <echo message="--- Build environment for Tomcat Server Configuration Application 
---" />
  
      <echo message="If ${property_name} is displayed, then the property is not set)" 
/>
  
      <echo message="--- Build options ---" />
      <echo message="full.dist=${full.dist}" />
      <echo message="build.sysclasspath=${build.sysclasspath}" />
      <echo message="compile.debug=${compile.debug}" />
      <echo message="compile.deprecation=${compile.deprecation}" />
      <echo message="compile.optimize=${compile.optimize}" />
  
      <echo message="--- Ant Flags ---" />
      <echo message="&lt;style&gt; task available (required)=${style.available}" />
  
      <echo message="--- JDK ---" />
      <echo message="jdk.1.2.present=${jdk.1.2.present}" />
      <echo message="jdk.1.3.present=${jdk.1.3.present}" />
      <echo message="jdk.1.4.present=${jdk.1.4.present}" />
  
      <echo message="--- Required Libraries ---" />
      <echo message="jaxp.present=${jaxp.present}" />
      <echo message="jmx.present=${jmx.present}" />
      <echo message="servlet.present=${servlet.present}" />
  
      <echo message="--- Required JARs ---" />
      <echo message="jmxri.jar.present=${jmxri.jar.present}" />
      <echo message="servlet.jar.present=${servlet.jar.present}" />
      <echo message="struts.jar.present=${struts.jar.present}" />
  
      <echo message="--- Optional JARs ---" />
  
      <echo message="--- Conditional compilation flags ---" />
      <echo message="compile.admin=${compile.admin}" />
  
      <echo message="--- Distribution flags ---" />
      <echo message="copy.struts.jar=${copy.struts.jar}" />
  
    </target>
  
  
    <!-- ======================== BUILD: Copy JARs ========================== -->
    <target name="copy-struts.jar" if="struts.present">
      <copy todir="${webapps.build}/${webapp.name}/WEB-INF/lib" file="${struts.jar}"/>
      <copy todir="${webapps.build}/${webapp.name}/WEB-INF" 
file="${struts.lib}/struts-bean.tld"/>
      <copy todir="${webapps.build}/${webapp.name}/WEB-INF" 
file="${struts.lib}/struts-html.tld"/>
      <copy todir="${webapps.build}/${webapp.name}/WEB-INF" 
file="${struts.lib}/struts-logic.tld"/>
    </target>
  
  
    <!-- =================== BUILD: Create Directories ====================== -->
    <target name="build-prepare">
      <mkdir dir="${webapps.build}"/>
      <mkdir dir="${webapps.build}/${webapp.name}"/>
      <mkdir dir="${webapps.build}/${webapp.name}/WEB-INF"/>
      <mkdir dir="${webapps.build}/${webapp.name}/WEB-INF/classes"/>
      <mkdir dir="${webapps.build}/${webapp.name}/WEB-INF/lib"/>
    </target>
  
  
    <!-- ================ BUILD: Copy Static Files ========================== -->
    <target name="build-static" 
depends="flags,flags.display,build-prepare,copy-struts.jar">
      <copy todir="${webapps.build}/${webapp.name}">
        <fileset dir=".">
          <exclude name="build.*"/>
          <exclude name="**/*.java"/>
        </fileset>
      </copy>
      <copy 
tofile="${webapps.build}/${webapp.name}/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources.properties"
 
file="${webapps.build}/${webapp.name}/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties">
      </copy>
    </target>
  
  
    <!-- ================= BUILD: Compile Server Components ================= -->
    <target name="build-main" depends="build-static" if="compile.admin">
  
      <javac   srcdir="WEB-INF/classes"
               destdir="${webapps.build}/${webapp.name}/WEB-INF/classes"
               debug="${compile.debug}" deprecation="${compile.deprecation}"
               optimize="${compile.optimize}"
               excludes="**/CVS/**">
        <classpath refid="admin.classpath" />
      </javac>
  
    </target>
  
  
    <!-- ==================== BUILD: Rebuild Everything ===================== -->
    <target name="all" depends="build-clean,build-main"
     description="Clean and build admin webapp"/>
  
  
    <!-- ======================= BUILD: Clean Directory ===================== -->
    <target name="build-clean">
      <delete dir="${webapps.build}"/>
    </target>
  
  
    <!-- ======================= DIST: Create Directories =================== -->
    <target name="dist-prepare">
      <mkdir dir="${webapps.dist}"/>
    </target>
  
  
    <!-- ======================= DIST: Create Distribution Files ============ -->
    <target name="dist" depends="build-main,dist-prepare"
     description="Create admin webapp binary distribution">
        <jar   jarfile="${webapps.dist}/${webapp.name}.war"
               basedir="${webapps.build}/${webapp.name}" includes="**"/>
    </target>
  
  
    <!-- ======================= DIST: Clean Directory ====================== -->
    <target name="dist-clean">
      <deltree dir="${dist.dir}"/>
    </target>
  
  
    <!-- ====================== Convenient Synonyms ========================= -->
    <target name="clean" depends="build-clean,dist-clean"
     description="Clean build and dist directories"/>
  
  
  </project>
  
  
  
  1.1                  jakarta-tomcat-4.0/webapps/admin/error.jsp
  
  Index: error.jsp
  ===================================================================
  <!-- Standard Struts Entries -->
  
  <%@ page language="java" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  
  <html:html locale="true">
  
  <!-- Standard Content -->
  
  <%@ include file="header.jsp" %>
  
  <!-- Body -->
  
  <center>
  
  <h2>
    <bean:message key="error.login"/>
  </h2>
  
  </center>
  
  <!-- Standard Footer -->
  
  <%@ include file="footer.jsp" %>
  
  </body>
  
  </html:html>
  
  
  
  1.1                  jakarta-tomcat-4.0/webapps/admin/footer.jsp
  
        <<Binary file>>
  
  
  1.1                  jakarta-tomcat-4.0/webapps/admin/header.jsp
  
  Index: header.jsp
  ===================================================================
  <!--
    Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
    reserved.
  -->
  
  <head>
    <title><bean:message key="application.title"/></title>
    <html:base/>
  </head>
  
  <body bgcolor="white">
  
  
  
  1.1                  jakarta-tomcat-4.0/webapps/admin/index.jsp
  
  Index: index.jsp
  ===================================================================
  <!-- Standard Struts Entries -->
  
  <%@ page language="java" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  
  <html:html locale="true">
  
  <!-- Standard Content -->
  
  <%@ include file="header.jsp" %>
  
  <!-- Body -->
  
  <center>
  
  <h2><bean:message key="index.success"/></h2>
  <p>
  <h2>
    <bean:message key="index.logout"/>
    <html:link page="/logOut.do">
      <bean:message key="index.here"/>
    </html:link>
  </h2>
  
  <html:errors/>
  
  <html:form method="POST" action="/sample" focus="someText">
    <table border="0" cellspacing="5">
      <tr>
        <th align="right">
          <bean:message key="prompt.someText"/>
        </th>
        <td align="left">
          <html:text property="someText" size="16" maxlength="16"/>
        </td>
      </tr>
      <tr>
        <th align="right">
          <bean:message key="prompt.moreText"/>
        </th>
        <td align="left">
          <html:text property="moreText" size="16" maxlength="16"/>
        </td>
      </tr>
      <tr>
        <td align="right">
          <html:submit>
            <bean:message key="button.save"/>
          </html:submit>
        </td>
        <td align="left">
          <html:reset>
            <bean:message key="button.reset"/>
          </html:reset>
        </td>
      </tr>
    </table>
  </html:form>
  
  </center>
  
  <!-- Select language -->
  
  <hr>
  
  <h2><bean:message key="login.changeLanguage"/></h2>
  
  <html:form action="/setLocale" method="POST">
    <table border="0" cellspacing="5">
      <tr>
        <td align="right">
          <html:select property="locale">
            <html:options name="applicationLocales"
                      property="localeValues"
                     labelName="applicationLocales"
                 labelProperty="localeLabels"/>
          </html:select>
        </td>
        <td align="left">
          <html:submit>
            <bean:message key="button.change"/>
          </html:submit>
        </td>
      </tr>
    </table>
  </html:form>
  
  </center>
  
  <!-- Standard Footer -->
  
  <%@ include file="footer.jsp" %>
  
  </body>
  
  </html:html>
  
  
  
  1.1                  jakarta-tomcat-4.0/webapps/admin/login.jsp
  
  Index: login.jsp
  ===================================================================
  <!-- Standard Struts Entries -->
  
  <%@ page language="java" %>
  <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
  <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
  <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
  
  <html:html locale="true">
  
  <!-- Standard Content -->
  
  <%@ include file="header.jsp" %>
  
  <!-- Body -->
  
  <center>
  
  <!-- Login -->
  
  <h2><bean:message key="login.enter"/></h2>
  
  <form method="POST" action='<%= response.encodeURL("j_security_check") %>'
   name="loginForm">
    <table border="0" cellspacing="5">
      <tr>
        <th align="right">
          <bean:message key="prompt.username"/>
        </th>
        <td align="left">
          <input type="text" name="j_username" size="16" maxlength="16"/>
        </td>
      </tr>
      <tr>
        <th align="right">
          <bean:message key="prompt.password"/>
        </th>
        <td align="left">
          <input type="password" name="j_password" size="16" maxlength="16"/>
        </td>
      </tr>
      <tr>
        <td align="right">
          <input type="submit" value='<bean:message key="button.login"/>'>
        </td>
        <td align="left">
          <input type="reset" value='<bean:message key="button.reset"/>'>
        </td>
      </tr>
    </table>
  </form>
  
  <script language="JavaScript" type="text/javascript">
    <!--
      document.forms["loginForm"].elements["j_username"].focus()
    // -->
  </script>
  
  <!-- Standard Footer -->
  
  <%@ include file="footer.jsp" %>
  
  </body>
  
  </html:html>
  
  
  
  1.1                  jakarta-tomcat-4.0/webapps/admin/WEB-INF/struts-config.xml
  
  Index: struts-config.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1" ?>
  
  <!DOCTYPE struts-config PUBLIC
            "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
            "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";> 
  
  
  <struts-config>
  
  
    <!-- ========== Data Source Configuration =============================== -->
  
  
    <!-- ========== Form Bean Definitions =================================== -->
  
    <form-beans>
  
      <!-- Sample form bean -->
      <form-bean      name="sampleForm"
                      type="org.apache.webapp.admin.SampleForm"/>
  
      <!-- Set Locale form bean -->
      <form-bean      name="setLocaleForm"
                      type="org.apache.webapp.admin.SetLocaleForm"/>
  
    </form-beans>
  
  
    <!-- ========== Global Forward Definitions ============================== -->
  
    <global-forwards>
  
      <forward        name="Main Menu"
                      path="/index.jsp"
                  redirect="false"/>
  
    </global-forwards>
  
  
    <!-- ========== Action Mapping Definitions ============================== -->
  
    <action-mappings>
  
      <!-- Log out of the application -->
      <action    path="/logOut"
                 type="org.apache.webapp.admin.LogOutAction">
        <forward        name="Main Menu"
                        path="/index.jsp"
                    redirect="true"/>
      </action>
  
      <!-- Process a user sample change -->
      <action    path="/sample"
                 type="org.apache.webapp.admin.SampleAction"
                 name="sampleForm"
                scope="request"
                input="/index.jsp">
      </action>
  
      <!-- Process a set-locale action -->
      <action    path="/setLocale"
                 type="org.apache.webapp.admin.SetLocaleAction"
                 name="setLocaleForm"
                scope="session">
      </action>
  
    </action-mappings>
  
  
  </struts-config>
  
  
  
  1.1                  jakarta-tomcat-4.0/webapps/admin/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  <?xml version="1.0" encoding="ISO-8859-1"?>
  
  <!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>
  
    <!-- Action Servlet Configuration -->
    <servlet>
      <servlet-name>action</servlet-name>
      <servlet-class>
        org.apache.webapp.admin.ApplicationServlet
      </servlet-class>
      <init-param>
        <param-name>application</param-name>
        <param-value>
          org.apache.webapp.admin.ApplicationResources
        </param-value>
      </init-param>
      <init-param>
        <param-name>config</param-name>
        <param-value>/WEB-INF/struts-config.xml</param-value>
      </init-param>
      <init-param>
        <param-name>debug</param-name>
        <param-value>0</param-value>
      </init-param>
      <init-param>
        <param-name>detail</param-name>
        <param-value>0</param-value>
      </init-param>
      <init-param>
        <param-name>locale</param-name>
        <param-value>true</param-value>
      </init-param>
      <init-param>
        <param-name>nocache</param-name>
        <param-value>true</param-value>
      </init-param>
      <init-param>
        <param-name>validate</param-name>
        <param-value>true</param-value>
      </init-param>
      <load-on-startup>2</load-on-startup>
    </servlet>
  
    <!-- Action Servlet Mapping -->
    <servlet-mapping>
      <servlet-name>action</servlet-name>
      <url-pattern>*.do</url-pattern>
    </servlet-mapping>
  
    <!-- Struts Tag Library Descriptors -->
    <taglib>
      <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
      <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
  
    <taglib>
      <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
      <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
  
    <taglib>
      <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
      <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
  
    <!-- Security is active on entire directory -->
    <security-constraint>
      <display-name>Tomcat Server Configuration Security Constraint</display-name>
      <web-resource-collection>
        <web-resource-name>Protected Area</web-resource-name>
        <!-- Define the context-relative URL(s) to be protected -->
        <url-pattern>/*</url-pattern>
      </web-resource-collection>
      <auth-constraint>
        <!-- Anyone with one of the listed roles may access this area -->
        <role-name>admin</role-name>
      </auth-constraint>
    </security-constraint>
  
    <!-- Login configuration uses form-based authentication -->
    <login-config>
      <auth-method>FORM</auth-method>
      <realm-name>Tomcat Server Configuration Form-Based Authentication 
Area</realm-name>
      <form-login-config>
        <form-login-page>/login.jsp</form-login-page>
        <form-error-page>/error.jsp</form-error-page>
      </form-login-config>
    </login-config>
  
  </web-app>
  
  
  


Reply via email to