Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. WebWork will take notice since the URI ends in .action (defined in web.xml files)
  2. WebWork will look up the action formTest in its action hierarchy and call any Interceptors that might have been defined.
  3. 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.
  4. The method will process successfully and give WebWork the SUCCESS return parameter.
  5. 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
xml
xml

<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>