aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 365
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
 
Similar Threads
Showing .tif images on browser
How to set the formatter in Eclipse?
Displaying Images
Regarding metadata fetched through web browser
Response Headers