On Feb 8, 2008, at 2:34 PM, Anoop Kulkarni wrote:

jdk 1.6.0_03

I’m getting the following exception while having a Filter render HTML.

com.caucho.log.EnvironmentLogger.log [0] HTTP/1.1 200 OK
com.caucho.log.EnvironmentLogger.log [0] cache-control: no-cache
com.caucho.log.EnvironmentLogger.log [0] expires: 1
com.caucho.log.EnvironmentLogger.log [0] Pragma: no-cache
com.caucho.log.EnvironmentLogger.log [0] Content-Type: application/x- javascript
com.caucho.log.EnvironmentLogger.log [0] Content-Length: 29180
com.caucho.log.EnvironmentLogger.log [0] write-chunk(16382)
com.caucho.log.EnvironmentLogger.log java.lang.IllegalStateException: http://xxxx/yy: tried to write 29213 bytes with content-length 29180 (At 'u', char=117). at com .caucho .server .connection.ResponseStream.lengthException(ResponseStream.java:548)
I searched through google and past archives and other than a similar bug for rendering images, I couldn’t find anything which might point me in the right direction.

To give a brief idea on the above execution, I generate an HTML page, pass it through a SAX filter and then to a Filter which renders the HTML when I get the above error.

You probably want your filter to disable the setContentLength() method for the response object.

The length of the pre-processed data will be different from the actual length. Instead, just disable it and let Resin used chunked-encoding to handle the output.

-- Scott

Any help in understanding this error is appreciated.
Anoop Kulkarni
resin-interest mailing list

resin-interest mailing list

Reply via email to