Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within I/O and Streams
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Tim Cooke
Devaka Cooray
Sheriffs:
Liutauras Vilda
paul wheaton
Rob Spoor
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Piet Souris
Mikalai Zaikin
Bartenders:
Carey Brown
Roland Mueller
Forum:
I/O and Streams
HttpServletResponse Output
Eduardo Bueno
Ranch Hand
Posts: 159
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
response.setContentType("application/vnd.ms-excel"); response.addHeader("Content-Disposition", "attachment; filename=someFile.xls"); response.getOutputStream().write(someByteArrayOutputStream.toByteArray()); response.getOutputStream().flush();
This code works fine. The application creates a xls file that is flushed by the response object to the client.
My doubt is: who manages that response? Is it the browser, the client's OS or the client's JVM who opens the window with open/save/cancel options?
Joe Ess
Bartender
Posts: 9626
16
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The browser. The client JVM will not be running unless there is an
applet
on the page.
[
How To Ask Questions On JavaRanch
]
Then YOU must do the pig's work! Read this tiny ad. READ IT!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
HFSJ Mock Exam question 45
Is any way We can tell JSF to not response
Servlet - Urgent help required.
Writing a File and Request Dispatcher Forward
PDF with jsf
More...