tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Tomcat 4 and including HTML files
Date Thu, 05 Oct 2000 06:29:43 GMT
Elijah Roberts wrote:

> I just installed Tomcat 4 to try it out and I'm experiencing a slight
> problem with it. In some of my JSPs I use
> <jsp:include page="/include/header.html" flush="true" />
> To include a standard header at the top of all the pages. It worked fine
> in Tomcat 3.1, but not in Tomcat 4. If I change it to
> <jsp:include page="/include/header.jsp" flush="true" />
> and rename the .html file as .jsp, it once again works fine. The
> following exception is getting thrown in the log whenever a file
> including the .html file gets called:

Yep.  You've run into a known bug in the current implementation.  This will be addressed before
final release of Tomcat 4.0.  In the interim, a workaround is to convert your standard headers
footers, if any) to JSP pages (with a ".jsp" extension) instead of being static HTML files.

> >2000-09-30 17:01:11 ApplicationDispatcher[] Servlet.service() for servlet default
threw exception
> >java.lang.IllegalStateException: getWriter() has already been called for this response
> >       at org.apache.catalina.connector.ResponseBase.getOutputStream(
> >       at javax.servlet.ServletResponseWrapper.getOutputStream(
> >       at org.apache.catalina.servlets.DefaultServlet.serveResource(
> >       at org.apache.catalina.servlets.DefaultServlet.doGet(
> >       at javax.servlet.http.HttpServlet.service(
> >       at javax.servlet.http.HttpServlet.service(
> >       at org.apache.catalina.core.ApplicationDispatcher.invoke(
> >       at org.apache.catalina.core.ApplicationDispatcher.include(
> >       at org.apache.jasper.runtime.PageContextImpl.include(
> I assume it means that the DefaultServlet is using the OutputStream after
> the Writer has already been used causing the exception. So my question
> is, is it legal to include HTML files like that, or should one only
> include jsp files? Or is this something that will/needs to be fixed?
> Elijah Roberts

Craig McClanahan

See you at ApacheCon Europe <>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat

View raw message