File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About response from servlet
 
Similar Threads
How response is send back to browser
MVC Architecture.
How to retrieve HttpResponse Headers
Response header
MVC Architecture