Yes, this is very easy. Use the velocity example as a reference:
[1] Add the FreemarkerServlet to your web.xml:
<servlet>
<servlet-name>freemarker</servlet-name>
<servlet-class>freemarker.ext.servlet.FreemarkerServlet</servlet-class>
<!-- FreemarkerServlet settings: -->
...
<load-on-startup>10</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>freemarker</servlet-name>
<url-pattern>*.ftl</url-pattern>
</servlet-mapping>
[2] Use the url-pattern specified in the servlet mapping in your maverick.xml:
<commands>
<command name="someCommand">
<controller class="SomeController" />
<view name="success" path="SomeFreeMarkerTemplate.ftl" />
</command>
</commands>
[3] By default, the model in your FreeMarker template will be in a property called
${model}:
<body>
<h1>Hello ${model.userName}</h1>
</body>
That should do it (it did for me). I'm using FreeMarker 2.3pre13.
-----Oorspronkelijk bericht-----
Van: Mark Brand [mailto:[EMAIL PROTECTED]
Verzonden: Tuesday, September 23, 2003 3:35 PM
Aan: [EMAIL PROTECTED]
Onderwerp: [Mav-user] freemarker
hi
can i use freemarker with maverick as a view?
thanks
mark
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]