THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
TODO: There is a lot of overlapping info at Action Configuration.
Example
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="ISO-8859-1"?> <!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-stack name="defaultComponentStack"> <interceptor-ref name="component"/> <interceptor-ref name="defaultStack"/> </interceptor-stack> </interceptors> <default-interceptor-ref name="defaultStack"/> <action name="SimpleCounter" class="com.opensymphony.webwork.example.counter.SimpleCounter"> <result name="success" type="dispatcher">/success.jsp</result> <interceptor-ref name="defaultComponentStack"/> </action> <!-- - Velocity implementation of the SimpleCounter. Also demonstrate a more verbose version of result element --> <action name="VelocityCounter" class="com.opensymphony.webwork.example.counter.SimpleCounter"> <result name="success" type="velocity"> <param name="location">/success.vm</param> </result> <interceptor-ref name="defaultComponentStack"/> </action> <!-- - Different method can be used (processForm). --> <action name="formTest" class="com.opensymphony.webwork.example.FormAction" method="processForm" > <result name="success" type="dispatcher">/formSuccess.jsp</result> <result name="invalid.token" type="dispatcher">/form.jsp</result> <interceptor-ref name="defaultStack"/> <interceptor-ref name="token"/> </action> </package> </xwork> |
...