Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

About the response object

 
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 ???
 
Sheriff
Posts: 9671
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • 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)
 
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.
 
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
 
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic