It could be in one of your tag libraries, but you probably thought of that already.  :)

I've also seen cases where it's the generated servlet that has out.println calls 
before the redirect.  Perhaps it's the newline character after the "%>".  Try putting 
all of the directives (page and taglib) on the same line.  For example:

<%@ page contentType=...%><%@ taglib ... %>

You may also want to try looking at the .java file that gets generated to see what's 
going on.

Allen

> -----Original Message-----
> From: Maxime Colas des Francs [mailto:[EMAIL PROTECTED] 
> Sent: Friday, September 05, 2003 9:39 AM
> To: Tomcat Users List
> Subject: Re: forward error
> 
> 
> Hi
> 
> thks for your response, but here is my code, i don't 
> understand where the 
> response is commited !
> 
> _____________
> 
> <%@ page contentType="text/html; charset=iso-8859-1" language="java" 
> errorPage="/error_jsp.jsp"%>
> <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
> <%@ taglib prefix="log" 
> uri="http://jakarta.apache.org/taglibs/log-1.0"; %>
> <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql"; %>
> 
> <sql:query var="ctcRow">
>     SELECT DISTINCT email FROM ctc ORDER by email
> </sql:query>
> 
> <c:forEach items="${ctcRow.rows}" var="row">
> 
>          <log:info category='<%= request.getRemoteUser() %>'>
>             <c:out value="${row.email}"/>
>          </log:info>
> 
> </c:forEach>
> 
> <jsp:forward page="/index.jsp"/>
> 
> ___________
> 
> if i put a autoFlush="false" in page directive and a <% 
> out.flush(); %> 
> just before the forward i have a bufferOverflow ...
> 
> 
> 
> At 16:00 2003-09-04 -0400, you wrote:
> >More information ...
> >http://jakarta.apache.org/tomcat/faq/misc.html#illegalstate
> >-Tim
> >
> >Shapira, Yoav wrote:
> >>Howdy,
> >>Both errors are fairly clear and essentially the same.  You can't
> >>forward or redirect a response that's been committed, i.e. 
> written to.
> >>If you're going to forward or redirect a response, you must 
> do so before
> >>writing to the response.  You can read the JavaDoc for
> >>HttpServletResponse#sendRedirect and RequestDispatcher#forward.
> >>Yoav Shapira
> >>Millennium ChemInformatics
> >>
> >>
> >>>-----Original Message-----
> >>>From: Maxime Colas des Francs [mailto:[EMAIL PROTECTED]
> >>>Sent: Thursday, September 04, 2003 3:37 PM
> >>>To: [EMAIL PROTECTED]
> >>>Subject: forward error
> >>>
> >>>Hi,
> >>>
> >>>- If at the end of on of a jsp file, i put a 
> <jsp:forward>, i have this
> >>:
> >>
> >>>java.lang.IllegalStateException: Error: Attempt to clear a buffer
> >>that's
> >>
> >>>already been flushed
> >>>         at
> >>>org.apache.jasper.runtime.PageContextImpl.forward(PageConte
> xtImpl.java:
> >>415)
> >>
> >>>         at 
> org.apache.jsp.test_ps_jsp._jspService(test_ps_jsp.java:448)
> >>>         at
> >>>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
> >>>         ...
> >>>
> >>>- if i put a <c:redirect>, i have this :
> >>>java.lang.IllegalStateException
> >>>         at
> >>>org.apache.catalina.connector.HttpResponseFacade.sendRedire
> ct(HttpRespo
> >>nseF
> >>
> >>>acade.java:173)
> >>>         at
> >>>org.apache.taglibs.standard.tag.common.core.RedirectSupport
> .doEndTag(Re
> >>dire
> >>
> >>>ctSupport.java:151)
> >>>         at
> >>>org.apache.jsp.test_ps_jsp._jspx_meth_c_redirect_1(test_ps_
> jsp.java:123
> >>3)
> >>
> >>>         at 
> org.apache.jsp.test_ps_jsp._jspService(test_ps_jsp.java:453)
> >>>         ...
> >>>
> >>>- if i put nothing, i have no error ...
> >>>
> >>>sombdy can help me to understand this error ?
> >>>
> >>>
> >>>-----------------------------------------------------------
> ----------
> >>>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>>For additional commands, e-mail: 
> [EMAIL PROTECTED]
> >>
> >>
> >>This e-mail, including any attachments, is a confidential business 
> >>communication, and may contain information that is confidential, 
> >>proprietary and/or privileged.  This e-mail is intended 
> only for the 
> >>individual(s) to whom it is addressed, and may not be 
> saved, copied, 
> >>printed, disclosed or used by anyone else.  If you are not the(an) 
> >>intended recipient, please immediately delete this e-mail from your 
> >>computer system and notify the sender.  Thank you.
> >>
> >>------------------------------------------------------------
> ---------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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

Reply via email to