velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Kary <>
Subject Re: Rendering an output stream?
Date Wed, 17 Jul 2002 18:29:31 GMT

Thanks for the code snippit!  So it seems relatively trivial to include 
a stream from a 'controller' standpoint.  I need to throw one more 
'kink' into the problem.  I am using the Velocity-Struts tools code.  I 
am not really excited about extending the VelocityViewServlet code, and 
I am wondering if I can access the template from the 'View' side of the 

Is it possible to do something like this?  Or am I going in the wrong 

I guess I am thinking along about a template as follows:

        <td> File: $myFilename </td>

Just a quick example.  I hope it illustrates what I believe is the need 
to control 'where' we want the output stream to be put....



Geir Magnusson Jr. wrote:

>On 7/17/02 10:18 AM, "Jason Kary" <> wrote:
>>I am trying to figure out how I can use velocity to render an
>>OutputStream class.  I don't really want to buffer the output from the
>>OutputStream into a 'holding' object.  This will require too much memory.
>OutputStreamWriter osw = new OutputStreamWriter(outputStream);
> myTemplate.merge(ctx, osw);

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message