So why are trying to flush the included content!
Also what Tomcat version are you using?
What should happen here is the included content should go to
body content (bufferd JspWriter) object that belongs
the <tlt:iteration> tag, right?  So trying to flush it does
not send bytes to the awaiting HTTP Client browser
but instead clears the buffered content in the body content
(buffered JspWriter  ).  All I am saying that the body content
is analogus to:

     new BufferedWriter(
          new OutputStreamWriter(
               new ByteArrayOutputStream()));

--
Peter Pilgrim
G.O.A.T
                    "the Greatest Of All Time"



---------------------------------------- Message History 
----------------------------------------


From: Garrick Toubassi <[EMAIL PROTECTED]>@java.sun.com> on 22/02/2001 12:06 
PST

Please respond to A mailing list about Java Server Pages specification and             
 reference <[EMAIL PROTECTED]>

DELEGATED - Sent by:     A mailing list about Java Server Pages specification and      
        [EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:
Subject:  BodyTags don't allow jsp:includes?


I am running into an issue whereby it appears that BodyTags don't seem to
allow jsp:includes in them (exception attached).  It seems like this makes
BodyTags basically useless with a JSP body content, because restricting
people to not use jsp:include is unreasonable and certainly very subtle.
For instance, Tomcat comes with an "iteration example".  If you add a simple
jsp:include in the index.jsp file of that example webapp:

                <tlt:iteration name="departmentName" type="String"
group="<%= org.getDepartmentNames()%>">
                <tr>
                        <td> <jsp:include page="test.jsp" flush="true"/><a
href="list.jsp?deptName=<%= departmentName %>"><%= departmentName
%></a></td>
                </tr>
                </tlt:iteration>

You get the following exception:

java.io.IOException: Illegal to flush within a custom tag
        at javax.servlet.jsp.tagext.BodyContent.flush(BodyContent.java:87)
        at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:407)
        at
--<CUT>--




--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to