velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: ...a little more about mergeTemplate
Date Fri, 05 Oct 2001 14:33:16 GMT
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