• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About the response object

 
Sony Agrawal
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HFSJ,Page=43 wrote:The thread( that was spun when a request for a servlet is received ) completes, the container converts the response object into an HTTP response ....

I could not understand the above statement completely... What does it mean by saying " the container converts the response object into an HTTP response"
Can somebody explain this statement ???
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its a general statement to explain that the response object itself is not sent to the client, instead it is converted to an actual HTTP response which will just contain headers and body of the response...
 
Sony Agrawal
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ankit Garg wrote: it is converted to an actual HTTP response which will just contain headers and body of the response...

Did you mean to say, HTTP response= (header+ httpServletReponse object)
 
Ravinderjit Singh
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something about HTTP response

An HTTP response comprise the following things

1. A single status code
A status code is an integer value that describes the status of the response. The status code can indicate success or failure.

2. HTTP headers
Response headers that tell the client things like what software the server is running and the content type of the server's response

3. Response body
The response body is the main content of the response. For an HTML page, the response body is the HTML itself. For a graphic, the response body contains the bytes that make up the image. A response body can be of any type and of any length.
 
Lucas Smith
Ranch Hand
Posts: 808
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
response object is meaningless for the browser. so the conrainer has to convert it into http response which consists the headers and optionally the body
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic