You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jason Webber <we...@mminternet.com> on 2002/02/25 23:10:38 UTC

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:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: java.lang.IllegalStateException: Response has already been committed

Posted by Ken Martin <ke...@digitalcyclone.com>.
On Monday, February 25, 2002, at 04:10 PM, Jason Webber wrote:

> <jsp:include page="../servlet/RevGeocodeBlockServlet" flush="true">
> :::
> <jsp:include page="../servlet/RevGeocodeBlockServlet" flush="true">

Doesn't a servlet generate a full HTTP response? You can't do 
that twice from one request, can you? I didn't think you can use 
a servlet this way.

Ken Martin


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>