<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
	
<struts>
	<package name="validation" extends="struts-default" namespace="/validation">
	    <action name="quizBasic" class="org.apache.struts2.showcase.validation.QuizAction">
            <result name="input">quiz-basic.jsp</result>
            <result>quiz-success.jsp</result>
        </action>

        <action name="quizClient" class="org.apache.struts2.showcase.validation.QuizAction">
            <result name="input">quiz-client.jsp</result>
            <result>quiz-success.jsp</result>
        </action>

        <action name="quizClientCss" class="org.apache.struts2.showcase.validation.QuizAction">
            <result name="input">quiz-client-css.jsp</result>
            <result>quiz-success.jsp</result>
        </action>

        <action name="quizAjax" class="org.apache.struts2.showcase.validation.QuizAction">
            <result name="input">quiz-ajax.jsp</result>
            <result>quiz-success.jsp</result>
        </action>
	</package>


	<package name="validationExamples" extends="struts-default" namespace="/validation" >

		<action name="list">
			<result>index.jsp</result>
		</action>
		
		
		<!-- ======================== -->
		<!-- === Field Validators === -->
		<!-- ======================== -->
		
		<action name="showFieldValidatorsExamples" class="org.apache.struts2.showcase.validation.FieldValidatorsExampleAction" method="input">
			<result name="input" type="dispatcher">/validation/fieldValidatorsExample.jsp</result>
		</action>
		
		<action name="submitFieldValidatorsExamples" class="org.apache.struts2.showcase.validation.FieldValidatorsExampleAction" method="submit">
			<result name="input" type="dispatcher">/validation/fieldValidatorsExample.jsp</result>
			<result type="dispatcher">/validation/successFieldValidatorsExample.jsp</result>
		</action>
		
		
		
		<!-- ============================ -->
		<!-- === Non Field Validators === -->
		<!-- ============================ -->
		
		<action name="showNonFieldValidatorsExamples" class="org.apache.struts2.showcase.validation.NonFieldValidatorsExampleAction" method="input">
			<result name="input">/validation/nonFieldValidatorsExample.jsp</result>		
		</action>
		
		<action name="submitNonFieldValidatorsExamples" class="org.apache.struts2.showcase.validation.NonFieldValidatorsExampleAction" method="submit">
			<result name="input">/validation/nonFieldValidatorsExample.jsp</result>		
			<result>/validation/successNonFieldValidatorsExample.jsp</result>
		</action>
		
		
		
		<!-- ========================== -->
		<!-- === Visitor Validators === -->
		<!-- ========================== -->
		
		<action name="showVisitorValidatorsExamples" class="org.apache.struts2.showcase.validation.VisitorValidatorsExampleAction" method="input">
			<result name="input">/validation/visitorValidatorsExample.jsp</result>
		</action>
		
		<action name="submitVisitorValidatorsExamples" class="org.apache.struts2.showcase.validation.VisitorValidatorsExampleAction" method="submit">
			<result name="input">/validation/visitorValidatorsExample.jsp</result>
			<result>/validation/successVisitorValidatorsExample.jsp</result>
		</action>



		<!-- ========================== -->
		<!-- === Visitor Validators === -->
		<!-- ========================== -->

		<action name="clientSideValidationExample" class="org.apache.struts2.showcase.validation.FieldValidatorsExampleAction" method="input">
			<result name="input">/validation/clientSideValidationExample.jsp</result>
		</action>

		<action name="submitClientSideValidationExample" class="org.apache.struts2.showcase.validation.FieldValidatorsExampleAction" method="submit">
			<result name="input">/validation/clientSideValidationExample.jsp</result>
			<result>/validation/successClientSideValidationExample.jsp</result>
		</action>

		<!-- =========================================== -->
		<!-- === Store Error Messages Across Request === -->
		<!-- =========================================== -->
		
		<action name="submitApplication" class="org.apache.struts2.showcase.validation.SubmitApplication" method="submitApplication">
			<interceptor-ref name="store">
				<param name="operationMode">STORE</param>
			</interceptor-ref>
			<interceptor-ref name="defaultStack" />
			<result name="input" type="redirect">/validation/resubmitApplication.action</result>
			<result type="redirect">/validation/applicationOk.action</result>
		</action>
		<action name="resubmitApplication" class="org.apache.struts2.showcase.validation.SubmitApplication">
			<interceptor-ref name="store">
				<param name="operationMode">RETRIEVE</param>
			</interceptor-ref>
			<result>/validation/storeErrorsAcrossRequestExample.jsp</result>
		</action>
		<action name="applicationOk" class="org.apache.struts2.showcase.validation.SubmitApplication" method="applicationOk">
			<interceptor-ref name="store">
				<param name="operationMode">RETRIEVE</param>
			</interceptor-ref>
			<result>/validation/storeErrorsAcrossRequestOk.jsp</result>
		</action>
		<action name="cancelApplication" class="org.apache.struts2.showcase.validation.SubmitApplication" method="cancelApplication">
			<result>/validation/storeErrorsAcrossRequestCancel.jsp</result>
		</action>
		
    </package>
</struts>
	
