Using Commons Chain with Struts
-
- 1. Commands
-
-
- 1.1. Calling Commands
-
- 1.2. Inside the Commands
-
2. Configuration
-
- 3. Testing
-
- 4. Examples
-
- 5. References
-
1. Commands
1.1. Calling Commands
- Use the 'command' and 'catalog' (optional) attributes for <action>
- Call the command from an Action like any other business facade. See CommandAction? in mailreader:
1.2. Inside the Commands
- A ServletActionContext? will be passed into the command's execute method.
- This may be cast to its parent class WebActionContext instead, if you don't need access to the actual request and response objects.
2. Configuration
- To use ChainAction, configure ChainListener with org.apache.commons.chain.CONFIG_CLASS_RESOURCE in web.xml. The specified xml file must contain a <catalog> element (not <chains> as in the examples.) See the ChainListener Javadoc which says:
TODO: Find the commons-user thread where Craig and Rahul explained the root element
3. Testing
/TestRequestParam
4. Examples
5. References
(/UsingChainAction Removed)