Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt in how response reaches the client....

 
Jeevitesh Singh
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when http response is sent to the client it contains html as a body.
but we normally send the response through either printwriter or jsp that also gets converted into
servlet and its reponse also is sent through out implicit object ....but my question is the response page that contains the html is
generated at the client by the browser and then rendered or container makes the html and then sends it over to client as http response....
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The latter. Response is sent as HTTP response, browsers don't generate HTML like that.
 
anilkumar patil
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its the container's job to send the response in the HttpResponse object. The server then send this to the client (web browser) via HTTP with the header and the body part. The web browser understands the HTTP. now it is the responsibility of the web browser to render the page with the given info.

The header part of the response has the specifics about the body . It contains the length and type of the data like Test/Html, Application/PDF which we call the mime type. The browser reads the header info and gets the reuired editors to read the data or render the page.

 
Jeevitesh Singh
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that means the container gets what we write through printwriter or implicit out object in the jsp...
and then it pastes it in the body of the http reponse.........
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic