Jason van Zyl wrote:

> On 7/6/01 5:44 AM, "Rapha�l Luta" <[EMAIL PROTECTED]> wrote:
> 
> 
>>Dave Bryson wrote:
>>
>>
>>>The side benefit is that once you have had a enough
>>>of the pain of dealing with JSP and can convince management
>>>to let it go, and it'll be a little easier to roll-back to Velocity!
>>>
>>>
>>
>>Not exactly, you can't use JSP within a Velocity template (at least in
>>Turbine, never checked in straight Velocity) so you'll have to convert
>>all your templates in one go from JSP to Velocity, and probably remove
>>all those hard-coded ".jsp" and ".vm" references in your code...
>>
> 
> We'll try and get rid of this problem in 2.2 by allow direct streaming
> if you wish instead of the buffering that is occurring right now. It
> terms of scalability I think that buffering all the output isn't really
> that great an idea because 1000 connections all having the output
> buffered might be a bit of a bottleneck.
> 
> I briefly talked to jon about it and he said he liked the buffering
> so that you could change the headers depending on what might have
> occurred along the display pipeline. But I definitely think for more
> deterministic systems that direct streaming would be more efficient
> and I think this would get rid of the JSP/Velocity problem in
> jetspeed. 
> 
> Raphael, if the output wasn't buffered but directly streamed would
> this indeed get rid of the mixed jsp/velocity portlet problem?
>  


I guess so, although this may also require an extension to velocity
syntax (I don't know if velocity is buffered or stream based when
processing a template) to force Velocity to flush content before
evaluating a variable, maybe something like

content before
...
$|myservletwrapper

...

content after

where $| would ensure that the generated content before is streamed before
evaluating "$myservletwrapper".

AFAIK the issue is not related to JSP but to the servlet 2.2+ specification:
you can't intercept the response stream of a servlet except at a container
level; thus any servlet/framewaork that expects to aggregate several servlet
output (and JSP "templates" are just on-the-fly servlets) *must* be stream
based or is screwed.

There are definitely some advantages to buffer based layout system like
Turbine (although I too think there's a performance penality under load)
but the servlet spec. really works against you.

--
Raphael Luta - [EMAIL PROTECTED]
Vivendi Universal Networks - Paris


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

Reply via email to