[Logo] Mentawai Recipes
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Moderation Log] Moderation Log   [Register] Register / 
[Login] Login 
Sending emails with a velocity template  XML
Forum Index » Official Recipes
Author Message
saoj



Joined: 10/01/2008 08:20:15
Messages: 39
Offline

First get the velocity-dep-1.4.jar file that comes with Mentawai in the lib directory and place it inside the WEB-INF/lib directory of your web application.

Now use the following code inside your action:

The default directory to look for letters is /letters and for each locale you create a directory, for example:

/letters/pt_BR/hello.html
/letters/en_US/hello.html

The correct file will be loaded depending on the user locale, and the attributes will be replaced by a velocity template. You hello.html file might look like this:

Your HTML file will be treated as a velocity template, so you can use any velocity feature you want inside it.
 
Forum Index » Official Recipes
Go to:   
Powered by JForum 2.1.8 © JForum Team