This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes how to read the response content length in terms of charaters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to read the response content length in terms of charaters" Watch "how to read the response content length in terms of charaters" New topic
Author

how to read the response content length in terms of charaters

Pnbbabu Naresh
Greenhorn

Joined: Nov 21, 2011
Posts: 1
Hi All,

I need to find out a way to know the response content length in terms of characters.

I went through HttpServeletResponse API. There are headers methods - getHeader() and getHeaderNames() through which contentlength of the response is retrieved. However, these methods were included with servelt 3.0.
I need to find the response length in the terms of charaters or in size with servlet 2.5.

If there are no API defined methods, please suggest how to achieve this.

Possible inputs are helpful for me.

Thanks and Regards,
Naresh
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
Hi,

try method getHeader("Content-length"); of HttpServletResponse class.


Thanks,
Shailesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to read the response content length in terms of charaters