• 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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.........
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!