Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

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
xml
xml
titlestruts.xmlxml
<action name="test" class="com.acme.TestAction">
    <result name="success" type="velocity">test-success.vm</result>
</action>
Code Block
xml
xml
titletest-success.vmxml
<html>
<head>
    <title>Hello</title>
</head>
<body>

Hello, ${name}

</body>
</html>

...