Richard Dean wrote:
Hiya,

Sorry to jump on your bandwagon but I have a similar(-ish) problem. I can
currently generate an RTF document from a template with velocity. But what I
want to do after is write that document to a file on the server. I think I
want to use the java PrintWriter (etc) classes to achieve this but I have no
idea of where to start really (I am kinda new to velocity). I have looked
all over the net for answers but I haven't really been able to find anything
that tackles this issue. If anyone could give a little advice or a pointer
to somewhere where I can find inspiration it would be greatly appreciated!


A quick look at the JavaDocs leads me to suggest:


java.io.FileWriter f = new java.io.FileWriter("mydocument.rtf");
org.apache.velocity.app.Velocity.mergeTemplate("myrtf.vm", "UTF-8", ctx, f);

Or am I missing something?

HTH,
Martin


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to