tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "biordanov Last Name" <>
Subject RE: RequestDispatcher.include problem
Date Sat, 30 Dec 2000 21:14:55 GMT
I solved my problem with pageContext.getOut().flush() before the include instead of pageContext.getResponse().flushBuffer().
Strange. In any case, RequestDispatcher.include is supposed to flush the buffer, no? I looked
at the source code of RequestDispatcherImpl (Tomcat 3.2.1) and it does a response.flushBuffer
indeed, but it doesn't seem to work (it's got a comment stating that this is a hack to overcome
a problem with session ids). So it might be a bug. Any developers out there listening?

>Date: Fri, 29 Dec 2000 23:26:02 -0800
>From: "biordanov Last Name" <>
>Subject: RequestDispatcher.include problem
>Hi guys,
>Don't know whether this is really a problem or some sort of side-effect of the spec. In
a tag library I have a tag which has to include an external ressources (a JSP page). In the
tag I simple do the following:
>RequestDispatcher reqdisp = pageContext.getServletContext().getRequestDispatcher("/test.jsp");
>reqdisp.include(pageContext.getRequest(), pageContext.getResponse());
>test.jsp is compiled an included fine, but always at the beginning of response, before
any other text. I tried calling manually flushing the response buffer before the include,
but it didn't help. However, if the manual flushing is done in the page containing my tag,
then the included test.jsp appears at right place.
>Anyone? Is this normal? Known? Didn't find anything related in the archive.
>Thanks a lot,
>--== Sent via ==--
>To unsubscribe, e-mail:
>For additional commands, email:

--== Sent via ==--

View raw message