<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN" "http://www.opensymphony.com/xwork/xwork-1.0.dtd">
<xwork>
	<include file="webwork-default.xml"/>
	<package name="default" extends="webwork-default">
        <interceptors>
            <interceptor name="logincheck" class="test.LoginInterceptor"/>
        </interceptors>
        <action name="Start" class="test.StartAction">
            <result name="logged.in" type="dispatcher">/start.jsp</result>
            <result name="not.logged.in" type="dispatcher">/login.jsp</result>
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="logincheck"/>
        </action>
        <action name="Login" class="test.LoginAction">
            <result name="login.ok" type="dispatcher">/start.jsp</result>
            <result name="login.failure" type="dispatcher">/login.jsp</result>
            <result name="input" type="dispatcher">/login.jsp</result>
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="workflow"/>
        </action>
        <action name="List" class="test.ListAction">
            <result name="not.logged.in" type="dispatcher">/login.jsp</result>
            <result name="data.ok" type="dispatcher">/list.jsp</result>
            <result name="data.error" type="dispatcher">/error.jsp</result>
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="logincheck"/>
        </action>
        <action name="Enter" class="test.EnterAction">
            <result name="not.logged.in" type="dispatcher">/login.jsp</result>
            <result name="continue" type="dispatcher">/add.jsp</result>
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="logincheck"/>
        </action>
        <action name="Add" class="test.AddAction">
            <result name="not.logged.in" type="dispatcher">/login.jsp</result>
            <result name="data.ok" type="dispatcher">/add.jsp</result>
            <result name="data.error" type="dispatcher">/error.jsp</result>
            <result name="input" type="dispatcher">/add.jsp</result>
            <interceptor-ref name="defaultStack"/>
            <interceptor-ref name="logincheck"/>
            <interceptor-ref name="workflow"/>
        </action>
    </package>
</xwork>
