Like Ken says, calling the servlet like that will generate a full HTTP
response and close the output stream to the browser. Then your jsp will
continue trying to write to that stream which gives you the error. As long
as the service method of the servlet doesn't close the stream, you might be
able to replace the include for the servlet with:

<%
        new RevGeocodeBlockServlet.service(request, response);
%>

(not sure if the 'new' is necessary)

ChrisC


> -----Original Message-----
> From: Jason Webber [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 26, 2002 7:11 AM
> To: [EMAIL PROTECTED]
> Subject: java.lang.IllegalStateException: Response has 
> already been committed 
> 
> 
> I am trying to insert the output of a servlet into cells in a 
> html table.  I
> am getting the above error.  Here is a sample of the code:
> 
> ../servlet/RevGeocodeBlockServlet writes to the outputstream 
> a string which
> represents the location given by the lat and lon specified.
> 
> 
> <html><head><title>Location</title></head><body>
> <table>
> <tr><td>Danny</td><td>
> <jsp:include page="../servlet/RevGeocodeBlockServlet" flush="true">
> 
> <jsp:param name="longitude" value="<%= lon %>"/>
> 
> <jsp:param name="latitude" value="<%= lat %>"/>
> 
> </jsp:include>
> 
> </td></tr>
> 
> <tr><td>Jason</td><td>
> <jsp:include page="../servlet/RevGeocodeBlockServlet" flush="true">
> 
> <jsp:param name="longitude" value="<%= lon %>"/>
> 
> <jsp:param name="latitude" value="<%= lat %>"/>
> 
> </jsp:include>
> 
> </td></tr>
> </table>
> </body></html>
> 
> I don't believe that jsp:include should be doing anything to 
> the headers.
> Is there anything I can do to get around the problem.
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to