You might be encountering this due to that something was already written by printwriter -- e.g. you have something which is getting printed before your <jsp:forward page="some...> even a line break on jsp will do that because its getting interpreted as a string and gets printed.. hope that helps. ----- Original Message ----- From: "Boudreau, Mike" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Tuesday, January 08, 2002 1:15 PM Subject: RE: response has already been committed
> The autoFlush="false" and buffer="100kb" settings did not work. May pages > are very small. > > Could the problem be within the way pages are included in the Template Tags? > > > Maybe you cannot forward on an included page? > > What could be forcing the flush? Is this a Tomcal 3.3 problem? > > > > -----Original Message----- > From: Michelle Popovits [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 08, 2002 3:25 PM > To: 'Struts Users Mailing List' > Subject: RE: response has already been committed > > Turn auto-flush off and up the buffer until it's large enough > > This example has the autoflush off and the buffer set to 20 kb. > > <%@ page autoFlush="false" buffer="20kb" %> > > -----Original Message----- > From: Boudreau, Mike [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 08, 2002 3:25 PM > To: '[EMAIL PROTECTED]' > Subject: response has already been committed > > > I am using the Struts Template Tag Library with Tomcat 3.3 and I am > receiving the "Cannot forward because the response has already been > committed" javax.servlet.ServletException. > > I know that the cause is that some page is being flushed or written and then > I am trying do a <jsp:forward page="xxx.jsp"/> > > I don't know why the pages are being flushed or how to fix the problem. I > tried upping the page buffer, but that did not solve the problem. Does > anyone know what the problem and resolution is? > > These are the JSP pages with the problem: > > mainTemplate.jsp > <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %> > <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> > <%@ page errorPage="error.jsp" %> > <%@ page buffer="20kb" %> > > <html:html locale="true"> > <head> > <title><template:get name="title"/></title> > <link rel="stylesheet" href="css/templates.css" charset="ISO-8859-1" > type="text/css"> > <html:base/> > </head> > > <body background="graphics/background.gif"> > <table> > <tr valign="top"> > <td><template:get name="sidebar"/></td> > <td> > <table> > <tr><td><template:get name="header"/></td></tr> > <tr><td><template:get name="content"/></td></tr> > <tr><td><template:get name="footer"/></td></tr> > </table> > </td> > </tr> > </table> > </body> > </html:html> > > > home.jsp > <template:insert template='/mainTemplate.jsp'> > <template:put name='title' direct='true'> > <bean:message key="home.title"/> > </template:put> > <template:put name='header' content='/header.jsp' /> > <template:put name='sidebar' content='/sidebar.jsp' /> > <template:put name='content' content='/homeContent.jsp'/> > <template:put name='footer' content='/footer.html' /> > </template:insert> > > > > error.jsp > > <%@ page buffer="12kb" %> > <%@ page isErrorPage="true"%> > <%@ page import = "org.apache.log4j.Log" %> > > <% > > Log logger = new Log("JSP Error Handler"); > if (exception != null) > { > logger.error("JSP Error",exception); > } > else > { > logger.error("JSP Container Error, the exception object should always > be filled"); > } > > %> > > <jsp:forward page="unavailable.jsp"/> > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>