A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
How to download file throuch datahandler object?
Joined: Jan 08, 2013
Jan 08, 2013 00:13:47
I want to download a file in my
project. At bean side I am getting object of DataHandler. I tried to search many times but I did not found anything related to it. How can I download a file through datahandler object?
DataHandler src = attachment.getAttachment();
ByteArrayOutputStream output = new ByteArrayOutputStream();
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
And if anybody knows about a good tutorial on file download and file upload which describes whole process in detail would be great for me.
Joined: Mar 29, 2012
Jan 08, 2013 03:44:53
I know good tutorial on uploading files. It works for me
True person is moral, false is right!
I agree. Here's the link:
subject: How to download file throuch datahandler object?
JSF-portlet request response object in jsp
sending pdf or any attachment from a java webservice to java client using JAX-WS and SAAJ
how we forward a JSF page into Servlet
Open a new window programmatically
What's the best way to download files from a web app?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014