This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Servlets and the fly likes Question about response.getOutputStream() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Question about response.getOutputStream()" Watch "Question about response.getOutputStream()" New topic
Author

Question about response.getOutputStream()

Ted Dong
Greenhorn

Joined: May 16, 2001
Posts: 15
What does response.getOutputStream() return?
I want to capture the reponse that is sent back to the browser (ie, the html that the jsp page produces) and save it as a file on the server.
Does anyone have any examples?
Thanks in advance.
Angela Lamb
Ranch Hand

Joined: Feb 22, 2001
Posts: 156
It returns an OutputStream, just like the name says. You can use it to write to the page, but it doesn't give you the page contents.
 
rocket mass heater kickstarter
 
subject: Question about response.getOutputStream()