<!-- Action Mappings for the STRUTS Example Application -->

<!--
    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.
-->


<!--
  WARNING:  This file is deprecated, and remains only as an example
  of how the Struts configuration file would have been set up using
  the conventions of Struts 0.5.  All new development should be based
  on Struts 1.0 standards, and you should be configuring the file
  "struts-config.xml" instead.
-->

<action-mappings>

  <!-- Global Forward Declarations -->
  <forward name="logon"        path="/logon.jsp"/>

  <!-- Edit user registration -->
  <action    path="/editRegistration"
      actionClass="org.apache.struts.webapp.example.EditRegistrationAction"
    formAttribute="registrationForm"
        formClass="org.apache.struts.webapp.example.RegistrationForm">
    <forward name="success"    path="/registration.jsp"/>
  </action>

  <!-- Edit mail subscription -->
  <action    path="/editSubscription"
      actionClass="org.apache.struts.webapp.example.EditSubscriptionAction"
    formAttribute="subscriptionForm"
        formClass="org.apache.struts.webapp.example.SubscriptionForm">
    <forward name="failure"    path="/mainMenu.jsp"/>
    <forward name="success"    path="/subscription.jsp"/>
  </action>

  <!-- Process a user logoff -->
  <action    path="/logoff"
      actionClass="org.apache.struts.webapp.example.LogoffAction">
    <forward name="success"    path="/index.jsp"/>
  </action>

  <!-- Process a user logon -->
  <action    path="/logon"
      actionClass="org.apache.struts.webapp.example.LogonAction"
    formAttribute="logonForm"
        formClass="org.apache.struts.webapp.example.LogonForm"
        inputForm="/logon.jsp">
    <forward name="success"    path="/mainMenu.jsp"/>
  </action>

  <!-- Save user registration -->
  <action    path="/saveRegistration"
      actionClass="org.apache.struts.webapp.example.SaveRegistrationAction"
    formAttribute="registrationForm"
        formClass="org.apache.struts.webapp.example.RegistrationForm"
        inputForm="/registration.jsp">
    <forward name="success"    path="/mainMenu.jsp"/>
  </action>

  <!-- Save mail subscription -->
  <action     path="/saveSubscription"
       actionClass="org.apache.struts.webapp.example.SaveSubscriptionAction">
    <property name="formAttribute" value="subscriptionForm"/>
    <property name="formClass"
             value="org.apache.struts.webapp.example.SubscriptionForm"/>
    <property name="inputForm"     value="/subscription.jsp"/>
    <forward  name="success"        path="/editRegistration.do?action=Edit"/>
  </action>

</action-mappings>
