• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

doubt in how response reaches the client....  RSS feed

 
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....
 
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.
 
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.........
 
Men call me Jim. Women look past me to this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!