...
- WebWork will take notice since the URI ends in .action (defined in web.xml files)
- WebWork will look up the action formTest in its action hierarchy and call any Interceptors that might have been defined.
- WebWork will translate formTest and decide to call the method processForm in the class com.opensymphony.webwork.example.FormAction as defined in xwork.xml file.
- The method will process successfully and give WebWork the SUCCESS return parameter.
- WebWork will translate the SUCCESS return parameter into the location formSuccess.jsp (as defined in xwork.xml) and redirect accordingly.
Include
To make it easy to manage large scale development (lots of actions + configuration), WebWork allows you to include other configuration files from xwork.xml :
Code Block | ||||
---|---|---|---|---|
| ||||
<xwork>
<include file="webwork-default.xml"/>
<include file="user.xml"/>
<include file="shoppingcart.xml"/>
<include file="product.xml"/>
....
</xwork>
|
The included files must be the same format as xwork.xml (with the doctype and everything) and be placed on classpath (usually in /WEB-INF/classes or jar files in /WEB-INF/lib).
Most of the content here provided by Matt Dowell <matt.dowell@notiva.com>