File: /WEB-INF/validator/struts-config-type.xml


        <?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 struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
          "http://struts.apache.org/dtds/struts-config_1_3.dtd">

<struts-config>

  <!--============================================== Form Bean Definitions  -->
  <form-beans>

    <!-- Type form bean -->
    <form-bean name="typeForm" type="org.apache.struts.webapp.validator.TypeForm" />

    <!-- JavaScript Type form bean -->
    <form-bean name="jsTypeForm" type="org.apache.struts.webapp.validator.TypeForm" />

    <!-- Locale form bean -->
    <form-bean name="localeForm" type="org.apache.struts.action.DynaActionForm">
        <form-property name="language" type="java.lang.String" />
        <form-property name="country"  type="java.lang.String" />
    </form-bean>

  </form-beans>

  <!-- ========================================= Action Mapping Definitions -->
  <action-mappings>

    <!-- Type Actions -->
    <action path="/type" forward="/type.jsp" />

    <action path="/type-submit" 
            type="org.apache.struts.webapp.validator.TypeAction" 
            name="typeForm" 
            scope="request" 
            validate="true"
            cancellable="true"
            input="input">
        <forward name="input" path="/type.do" />
        <forward name="success" path="/welcome.do" />
    </action>

    <!-- JavaScript Type Actions -->
    <action path="/jsType" forward="/jsType.jsp" />

    <action path="/editJsType" 
            type="org.apache.struts.webapp.validator.EditTypeAction" 
            scope="request" 
            validate="false">
        <forward name="success" path="/jsType.do" />
    </action>

    <action path="/jsType-submit" 
            type="org.apache.struts.webapp.validator.TypeAction" 
            name="jsTypeForm" 
            scope="request" 
            validate="true"
            cancellable="true"
            input="/jsType.jsp">
        <forward name="success" path="/welcome.do" />
    </action>

    <!-- Show struts-config.xml -->
    <action path="/showStrutsConfigType" 
            type="org.apache.struts.webapp.validator.ShowFileAction" 
            scope="request" 
            parameter="/WEB-INF/validator/struts-config-type.xml">
        <forward name="success" path="/showFile.jsp" />
    </action>

    <!-- Show validations.xml -->
    <action path="/showValidationType" 
            type="org.apache.struts.webapp.validator.ShowFileAction" 
            scope="request" 
            parameter="/WEB-INF/validator/validation-type.xml">
        <forward name="success" path="/showFile.jsp" />
    </action>

  </action-mappings>

</struts-config>