2010/6/1 Manny Mondeo <manny...@yahoo.com>:
>          httpRes.setContentLength(content.toString().length());

Also, the above, or simplier "content.length()", will give you the
length measured in characters,  but Content-Length must be the length
measured in bytes.  For a multi-byte charset such as UTF-8 those are
certainly not the same. (Unless all your characters are 7-bit).

>          httpRes.setContentType( "text/html; charset=UTF-8" ) ;
>          out.write(content);
>          out.flush();
>          out.close();
>
>      }
>

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to