"Robert E. Baker" wrote:

> I have a self-contained servlet that returns a single value.  I am trying to
> include the output of this servlet in-line on an HTML/JSP page.  When I try
> to invoke the servlet using the following JSP INCLUDE tag, the page bombs
> with Exception #500 (java.lang.IllegalStateException: Writer is already
> being used for this request):
>
> <jsp:include page="/servlet/TestServlet" flush="true">
>    <jsp:param name="type" value="apples" />
> </jsp:include>
>

How does your servlet create its output?  If the servlet calls
response.getWriter(), this should work fine because it will use the same output
writer that the JSP page is using.  You should only hit this exception if your
servlet tries to call response.getOutputStream() instead.

Craig McClanahan



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

Reply via email to