tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: "Illegal to flush within a custom tag"
Date Thu, 03 Nov 2005 11:36:58 GMT
It looks like your custom tag is creating its own body content. The body 
content is handed back to the tag so furthur transformations may be done on 
it. So the whole tag needs evaluated and buffered before it may be flushed.

Your tag is returning BodyTag.EVAL_BODY_BUFFERED during doStartTag(). If it 
returns Tag.EVAL_BODY_INCLUDE, then the contents in the tag will be writing 
directly to the current output buffer.

-Tim

Graf László wrote:

> Hi
> I have some custom tags which can have in body
> other custom tag(s). Some of them list the content
> of a ResultSet in HTML page. I used flush to force
> the output of HTML.
> 
> This solution works fine using IAS9i but ported to
> JBoss 4.0.3 (what includes Tomcat 5.5.9) it throws
> 
> "java.io.IOException: Illegal to flush within a custom tag
>    at javax.servlet.jsp.tagext.BodyContent.flush(BodyContent.java:79)".
> 
> If I do comment those lines containing 'flush', the
> output does not appear. How can I fix this problem?
> 

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


Mime
View raw message