• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setContentLength()

 
plr kannan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
need u r help
response.setContentlength(500);
500 is byte or kb?
say if i sending 1000bytes of data from to the browser.but iam setting the contentlength as 600bytes. 600 bytes get downloaded from servlet1.
still the connection is kept open?
here i requested servlet2 at the same browser window now remaining 400 bytes get downloaded and servlet2 is also sending response !!
what is happening here?
Pl.R.Kannan
------------------
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13077
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
content length is in bytes.
The exact behaviour if the numbers don't match depends on the browser or plugin on the client side. Some care - some don't.
The server side does not pay any attention to the number you set.
Bill
------------------
author of:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic