You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Simon Kitching <sk...@obsidium.com> on 2005/11/14 04:52:11 UTC

jsp:include buffers generated data?

Hi,

I'm working with JSF, and am having some problems related to jsp:include.

It appears that jsp:include always creates a temporary buffer, stores 
the included data into that buffer, then appends the buffer to the 
original response output stream after the include has completed. This 
causes nasty interactions with JSF tags which tend to output themselves 
directly to the original response stream, and thus appear before the 
surrounding template text and non-JSF tags.

1) Can anyone point me at the implementation of jsp:include?

I guess it's part of jasper. Or maybe tomcat. Either way, I gave not 
been able to find the source to see what it's doing and maybe why..

2) Is this buffering behaviour of jsp:include mandated by the 
JSP/servlet specs, or tomcat-specific?


Thanks,

Simon

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jsp:include buffers generated data?

Posted by Simon Kitching <sk...@obsidium.com>.
Thanks Jacob.

I've looked at the Glassfish stuff dev list, and can't see any info 
related to this. Actually, the dev list is so primitive for this project 
it's clear that Sun still hasn't grasped the concept of running an Open 
Source project, and that most of the design stuff is happening off-list. 
I'm very grateful that Tomcat is run in a better manner! And go Geronimo!

A couple of posts (with suspiciously similar wording) state that the 
problem is "fixed" in the JSF spec, and that it's something to do with 
ViewHandler. However re-reading the spec (section 7.5) multiple times 
still hasn't made me any more enlightened.

There are some hints on those postings that you were the person who came 
up with the solution (or at least part of it), something to do with "EL 
aliasing"? Or was that something else? If you do know how this is 
supposed to work, then perhaps you could give some hints (via your own 
blog or otherwise)?

Otherwise I guess I'll just submit my own approach to MyFaces. Doesn't 
look like JSP2.1 and JSF1.2 support is going to be supported by anything 
other than Glassfish anytime soon anyway.

Regards,

Simon

Jacob Hookom wrote:
> This has come up in the JSF RI and was recently corrected with Glassfish,
> you might want to check their dev mailing lists
> 
> On 11/13/05, Simon Kitching <sk...@obsidium.com> wrote:
>> Hi,
>>
>> I'm working with JSF, and am having some problems related to jsp:include.
>>
>> It appears that jsp:include always creates a temporary buffer, stores
>> the included data into that buffer, then appends the buffer to the
>> original response output stream after the include has completed. This
>> causes nasty interactions with JSF tags which tend to output themselves
>> directly to the original response stream, and thus appear before the
>> surrounding template text and non-JSF tags.
>>
>> 1) Can anyone point me at the implementation of jsp:include?
>>
>> I guess it's part of jasper. Or maybe tomcat. Either way, I gave not
>> been able to find the source to see what it's doing and maybe why..
>>
>> 2) Is this buffering behaviour of jsp:include mandated by the
>> JSP/servlet specs, or tomcat-specific?
>>
>>
>> Thanks,
>>
>> Simon
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: jsp:include buffers generated data?

Posted by Jacob Hookom <ja...@gmail.com>.
This has come up in the JSF RI and was recently corrected with Glassfish,
you might want to check their dev mailing lists

On 11/13/05, Simon Kitching <sk...@obsidium.com> wrote:
>
> Hi,
>
> I'm working with JSF, and am having some problems related to jsp:include.
>
> It appears that jsp:include always creates a temporary buffer, stores
> the included data into that buffer, then appends the buffer to the
> original response output stream after the include has completed. This
> causes nasty interactions with JSF tags which tend to output themselves
> directly to the original response stream, and thus appear before the
> surrounding template text and non-JSF tags.
>
> 1) Can anyone point me at the implementation of jsp:include?
>
> I guess it's part of jasper. Or maybe tomcat. Either way, I gave not
> been able to find the source to see what it's doing and maybe why..
>
> 2) Is this buffering behaviour of jsp:include mandated by the
> JSP/servlet specs, or tomcat-specific?
>
>
> Thanks,
>
> Simon
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>