As your application grows, the actions.xml will become more and more difficult to manage.
One way of handling this growth is by splitting up the file into a number of smaller components, that are included in the master actions.xml file. There are two kinds of includes possible. Resource includes, and path includes.
Resource include
A resource include is where an actions.xml type file is included from the application's classpath. Note that this approach is J2EE classloader-friendly, in that you will be able to include actions even if the included resource is in a different classloader (as long as it is still visible through the J2EE classloader mechanism).
So for example:
<include resource="com/foo/bar/actions.xml" />
will load the actions.xml from the classpath, and replace the include element with the contents of the actions file inline.
Path include
A path include is functionally the same thing as a resource include. The only difference being that the resource is located relative to the file location of the including file. This is best illustrated with an example:
Say we have the follow main actions file, WEB-INF/classes/actions.xml
In this file, the following include is specified:
<include path="extras/actions.xml" />
The included file's location will therefore be: WEB-INF/classes/extras/actions.xml
Now lets say that in this extras file, we also have an include as follows:
<include path="../actions-addons.xml" />
The file include is always resolved to the current document. So therefore, the included content for the extras file will be loaded from WEB-INF/classes/actions-addons.xml
As you can see, includes as a powerful mechanism that when used appropriately, enable better componentisation of webwork action definitions, and help manage complexity and maintenance issues by allowing you to define related chunks of actions within their own file, rather than a global one for all actions in your application.