This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Servlets and the fly likes About response from servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "About response from servlet" Watch "About response from servlet" New topic
Author

About response from servlet

raj malhotra
Ranch Hand

Joined: Feb 22, 2007
Posts: 285
Hi
Someone please explain how response is send back from servlet to browser?
what i understand is, in servlet we write everything in HttpResponse onject ,which then taken by Container and is then used to send HTTP response to client.
But what container do with HttpResponse onject? I mean what are the webserver and webcontainer's responsiblities in handling the response? they both are confusing me about their individual role in returning response to the client.
[ October 22, 2007: Message edited by: raj malhotra ]
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

If you look at some sample code, you don't write to the HttpResponse, you write to an OutputStream obtained from the HttpResponse. This Stream acts like any other - it can be buffered or send data straight to the client, but that is up to the container.
 
GeeCON Prague 2014
 
subject: About response from servlet