This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes Issue in opening an excel file through bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Issue in opening an excel file through bean" Watch "Issue in opening an excel file through bean" New topic
Author

Issue in opening an excel file through bean

Soheb Shaikh
Greenhorn

Joined: Apr 17, 2013
Posts: 2
I am using JSF and in one of the managed bean (view scope) i have a method as:



The excel which is getting retrieved is corrupted file. It has some strange characters above and below is the entire code of JSP. I even tried application/octet-stream for contenttype too.

I tried the same with a plain text file and i was able to open it through.

Please help me with this problem, Thanks in advance.
Soheb Shaikh
Greenhorn

Joined: Apr 17, 2013
Posts: 2
http://stackoverflow.com/questions/9391838/how-to-stream-a-file-download-in-a-jsf-backing-bean/9394237#9394237

Please refer to this link as it solved my problem.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Issue in opening an excel file through bean
 
Similar Threads
Opening an xlsx Excel file
displaying jsp filename to downloading file in internet explorer
Forwarding after response committed
unable to downladmultiple file?
problems in downloading epub files