Length « Header « JSP-Servlet Q&A





1. Sending estimate HTTP Content-Length from Servlet etc    stackoverflow.com

I often need to generate content dynamically from a servlet / restlet or whatever, and don't know the length ahead of time. If the client is a browser, the progress bar ...

2. remove "content-length" item from the header of httpServletResponse    forums.oracle.com

Hi all, tomcat6.0, JDK5.0. I use tomcat6.0 as the web container and JDK version is 1.5. I found tomcat connector will add "content-length" item in all httpServletResponse header. But now I need generate some chunked http response.according the RFC, there should be no "content-length" item in the http header when response is chunked-encoding. So how can I remove the 'content-length" item ...