Thanks for the information.

Properly setting the file type was only part of the solution.  The other
part was to use the '## at the end of the line' trick to control where
Velocity inserted newlines and to insure that the v-card keywords were the
first non-whitespace on the line.

Thanks again


-----Original Message-----
From: Nathan Bubna [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 07, 2005 4:00 PM
To: Velocity Users List
Subject: Re: Using Velocity for non-HTML output


Sure.  velocity is designed to be a generic template language.  so
while it is often used to generate html, you can use it to generate
any text-based file type.  for instance, i've used it to export
spreadsheet data as tab-delimited files.

when it comes to using a servlet to do it, you will not only need to
know how the vcards should be formatted, but you should also set the
response's content-type header so that the user's browser/OS/whatever
might be able to figure out what to do with the file it is receiving.

On Mon, 7 Feb 2005 16:32:35 -0500, Withers John Z <[EMAIL PROTECTED]>
wrote:
>  
> Is it possible to use Velocity to prepare non-HTML output from a servlet? 
> In particular, my application creates 'v-cards' to be opened by the user's
> mail client.  From my results so far, it appears that I need to place text
> on discrete output lines.  How do I do this? 
>   
> Thanks! 
>   
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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

Reply via email to