...
- GUI for bundle administration
- Web access to Felix Shell
- Application packages can be divided into bundles
- Supports Velocity and FreeMarker templates
- Supports Struts Spring integration
- Supports integration with the Convention plugin
Missing Features
- Probably can't access application classes from bundles, including Spring classes
...
Code Block | ||||
---|---|---|---|---|
| ||||
<dependency>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>velocity-tools</groupId>
<artifactId>velocity-tools</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>1.8</version>
</dependency>
|
Using The Convention Plugin
The Convention plugin will discover actions in bundles in the same way that it discovers them in normal applications. The Convention plugin expects result templates to be (by default) to be stored under /WEB-INF/content. When packaging actions inside bundles, there won't be a WEB-INF folder, so you must let Convention know where the templates are located. There are two ways of doing so(assuming the templates are under content):
1. Set the templates location constant in struts.xml (in the application struts.xml, not a bundled struts.xml)
Code Block | ||||
---|---|---|---|---|
| ||||
<constant name="struts.convention.result.path" value="/content/"/>
|
2. Using the ResultPath annotation
Code Block |
---|
@ResultPath("/content")
public class HelloWorldAction extends ActionSupport
...
}
|
Example
Here is how an example architecture would look:
...