This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes doubt in how response reaches the client.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "doubt in how response reaches the client...." Watch "doubt in how response reaches the client...." New topic
Author

doubt in how response reaches the client....

Jeevitesh Singh
Greenhorn

Joined: Jun 19, 2008
Posts: 28
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

Joined: Aug 15, 2004
Posts: 2874
The latter. Response is sent as HTTP response, browsers don't generate HTML like that.
anilkumar patil
Greenhorn

Joined: Jul 14, 2009
Posts: 5
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

Joined: Jun 19, 2008
Posts: 28
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.........
 
jQuery in Action, 2nd edition
 
subject: doubt in how response reaches the client....