Thats really cool, you don't miss a bean! Sorry, I have just kinda had
velocity dumped on me at worked and to be honest I just didn't even notice
the javadocs at all(!). I am glad you sent that because I have just figured
out a couple of other things that had got me puzzled, from reading through
the docs!

Cheers matey... I'll stop wasting bulletin board time now!

-----Original Message-----
From: Martin Jacobson [mailto:[EMAIL PROTECTED]
Sent: 09 July 2003 14:52
To: Velocity Users List
Subject: Re: getting a mergerd Template as a Document?


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