velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Server-side redirect from VelocityTools?
Date Wed, 25 Jun 2008 14:11:31 GMT
Nathan,

Nathan Bubna wrote:
> On Tue, Jun 24, 2008 at 3:13 PM, White, Tim <Tim.White@qwest.com> wrote:
>> Hi -
>>
>>  I'm pretty sure that since the response is already set by the time that
>> a .vm template is running via VelocityViewServlet, that you can't do a
>> server-side redirect at that point.
> 
> True, unless you are using VelocityTools 2 and set:
> 
>    org.apache.velocity.tools.bufferOutput
> 
> to true in your servlet's init-params.

Is it true? I think you get a default buffer for output from the 
ServletOutputStream in the first place, so there's some wiggle-room.

I often set the Content-Type in my VMs.

Hmm... but I am using VelocityLayoutServlet, which I think builds the 
whole response in memory before streaming it. That could definitely be a 
factor.

-chris


Mime
View raw message