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 ]
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.