<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
          "http://struts.apache.org/dtds/struts-config_1_2.dtd">
<struts-config>
  <form-beans>
    <form-bean name="testbean" type="org.apache.struts.webapp.exercise.TestBean" />
    <!-- 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-property name="page" type="java.lang.String" />
    </form-bean>
  </form-beans>
  <global-forwards>
    <forward name="absolute" path="http://jakarta.apache.org/struts" />
    <forward name="context-relative" path="/welcome.do" contextRelative="true" />
    <forward name="module-root" path="/welcome.do" module="" />
    <forward name="module-validator" path="/welcome.do" module="/validator" />
    <forward name="relative" path="/welcome.do" />
    <forward name="redirect-default" path="/" redirect="true" />
    <forward name="logic-forward" path="/logic-forward.do" />
  </global-forwards>
  <action-mappings>
    <action path="/welcome" forward="/index.html" />
    <action path="/bean-write-2" forward="/bean-write-2.jsp" />
    <action path="/html-cancel" forward="/html-cancel.jsp">
            <set-property property="cancellable" value="false"/>
    </action>
    <action path="/html-cancel-true" name="testbean"
                input="/html-cancel.jsp" validate="true"
                forward="/welcome.do">
            <set-property property="cancellable" value="true"/>
    </action>
    <action path="/html-cancel-false" name="testbean"
                input="/html-cancel.jsp" validate="true"
                forward="/welcome.do">
            <set-property property="cancellable" value="false"/>
            <exception
                    key="errors.invalidCancel"
                    type="org.apache.struts.action.InvalidCancelException"
                    path="/html-cancel.jsp"/>
    </action>
    <action path="/html-cancel-exception" name="testbean"
                input="/html-cancel.jsp" validate="true"
                forward="/welcome.do">
            <set-property property="cancellable" value="false"/>
    </action>
    <action path="/html-cancel-novalidate" name="testbean"
                input="/html-cancel.jsp" validate="false"
                forward="/welcome.do">
            <set-property property="cancellable" value="false"/>
    </action>
    <action path="/html-img" forward="/html-img.jsp" />
     <!-- :FIXME: ImageAction should compute module prefix -->
    <action path="/html-img-action" type="org.apache.struts.webapp.exercise.ImageAction" parameter="/exercise/struts-power.gif"/>
    <action path="/html-link" forward="/html-link.jsp" />
    <action path="/html-link-submit" type="org.apache.struts.webapp.exercise.HtmlSettersAction" name="testbean" scope="session" validate="false">
      <forward name="input" path="/html-link.do" />
    </action>
    <action path="/html-messages" forward="/html-messages.jsp" />
    <action path="/html-multibox" forward="/html-multibox.jsp" />
    <action path="/html-multibox-submit" type="org.apache.struts.webapp.exercise.HtmlSettersAction" name="testbean" scope="session" validate="false">
      <forward name="input" path="/html-multibox.do" />
    </action>
    <action path="/html-select" forward="/html-select.jsp" />
    <action path="/html-select-submit" type="org.apache.struts.webapp.exercise.HtmlSettersAction" name="testbean" scope="session" validate="false">
      <forward name="input" path="/html-select.do" />
    </action>
    <action path="/html-setters" forward="/html-setters.jsp" />
    <action path="/html-setters-submit" type="org.apache.struts.webapp.exercise.HtmlSettersAction" name="testbean" scope="session" validate="false">
      <forward name="input" path="/html-setters.do" />
    </action>
    <action path="/logic-forward" forward="/logic-forward.jsp" />
    <action path="/logic-forward-test-forward" forward="/logic-forward-test-forward.jsp" />
    <action path="/logic-redirect-test-action" forward="/logic-redirect-test-action.jsp" />
    <action path="/logic-redirect-test-forward" forward="/logic-redirect-test-forward.jsp" />
    <action path="/logic-redirect-test-page" forward="/logic-redirect-test-page.jsp" />

    <action path="/forward-redirect-default" type="org.apache.struts.webapp.exercise.SuccessAction" >
        <forward name="success" path="/" redirect="true" contextRelative="true" />
    </action>
    <action path="/forward-redirect-default-module" type="org.apache.struts.webapp.exercise.SuccessAction" >
        <forward name="success" path="/" redirect="true" />
    </action>
    <action path="/forward-redirect-path" type="org.apache.struts.webapp.exercise.SuccessAction" >
        <forward name="success" path="/html-link.do" redirect="true" />
    </action>

      <!-- :FIXME: We could allow forward to use an action attribute
      <action path="/forward-redirect-default-module" type="org.apache.struts.webapp.exercise.SuccessAction" >
          <forward name="success" action="/html-link" redirect="true" />
      </action>
      -->

    <!-- Locale Action -->
    <action path="/locale" type="org.apache.struts.webapp.validator.LocaleAction" name="localeForm" scope="request">
      <forward name="success" path="/welcome.do" />
    </action>
  </action-mappings>
  <message-resources parameter="org.apache.struts.webapp.exercise.MessageResources" null="false" />
</struts-config>
