velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Soriano, Jaume" <JSori...@es.wanadoo.com>
Subject RE: ...a little more about mergeTemplate
Date Fri, 05 Oct 2001 14:54:34 GMT
Sure!
Thank you, i'll post it to the user list
if i get it.
Bye & enjoy your weekend!

-----Mensaje original-----
De: Geir Magnusson Jr. [mailto:geirm@optonline.net] 
Enviado el: viernes, 05 de octubre de 2001 16:33
Para: velocity-user@jakarta.apache.org
Asunto: Re: ...a little more about mergeTemplate


On 10/5/01 10:02 AM, "Soriano, Jaume" <JSoriano@es.wanadoo.com> wrote:

> When we do 'mergeTemplate(...)', is there any way to do something 
> similar as Bojan* tell us on its e-mail about pumpservlet, but not 
> only to control the errors but the entire stream.
> 
> (*) "all output during template merging goes into an 
> ByteArrayOutputStream, so none of it is committed before error 
> handling"  ?

> 
> i mean, do i must wait 'mergeTemplate' to finish before begin showing 
> something in the Internet Explorer window?

I assume you are talking about using VelocityServlet.

In the current implementation, the writer is flushed after the merge
happens.

You can simply override VelocityServlet.mergeTemplate() with a version that
does what you want - doing the same thing.

Take a look - it shouldn't be that hard.

(or use Bojan's...)

geir

-- 
Geir Magnusson Jr.     geirm@optonline.net
System and Software Consulting
"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety." - Benjamin Franklin


Mime
View raw message