struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Shahak.Nag...@ngc.com>
Subject Slightly OT: Preventing of buffer flush with tiles:insert
Date Thu, 08 Apr 2004 14:50:37 GMT
I'm trying to use a custom tag to gzip (compress) pages (filter won't work because I'm in a
servlet 2.3 environment).  On straightforward JSP's, it works fine.  But in "layout" JSP's
which employ the <tiles:insert> 
tag, I get IOExceptions and the container complains "Illegal to flush within a custom tag,"
pointing to javax.servlet.jsp.tagext.BodyContent.flush(BodyContent.java:115).

Looking at the J2EE API docs, it looks like the pageContext.include() method (which the tiles:insert
tag uses) flushes the content before including the specified tile/resource.

I've already tried:

- Returning EVAL_BODY_BUFFERED in the tag's doStartTag() method, in the hopes of flushing
the "temporary" buffer instead.
- Setting the tiles:insert "flush" attribute to "false", but it looks like from the source
code that only performs an additional flush before handing control over to the pageContent.include(),
which flushes on its own.
- Using the page directive to set the buffer size extremely high (4096kb) and autoFlush to
"false".

Any ideas?

Thanks,

Shahak Nagiel
Software Engineer
Northrop Grumman Mission Systems

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message