...
For more information on Velocity itself, please visit the Velocity website.
Noteinfo |
---|
Velocity is very similar to FreeMarker, as both are template languages that can be used outside of a Servlet container. The framework uses FreeMarker internally since it has better error reporting, support for JSP tags, and a richer feature set. However, both are good alternatives to JSP. |
...
Getting started with Velocity is as simple as ensuring all the dependencies are included in your project's classpath. Other than that, struts-default.xml already configures the Velocity Result.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<action name="test" class="com.acme.TestAction"> <result name="success" type="velocity">test-success.vm</result> </action> |
...