This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes JSF and the fly likes Save dialog box in jsf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Save dialog box in jsf" Watch "Save dialog box in jsf" New topic

Save dialog box in jsf

Happy S Singh
Ranch Hand

Joined: Nov 14, 2011
Posts: 58
I have created pdf using IText library
Now I want when the user clicks on the button ,it should prompt a save dialog box to the user to allow to browse the destination location to store the file.

Now My code looks like

Following filters are defined in web.xml

And the above code is written in the method of Backing Bean class

and invoked

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17282

JSF is designed to output HTML. PDF's are very different than HTML and you should use a non-JSF (traditional) servlet to generate and output the PDF. Otherwise JSF will mangle it.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Save dialog box in jsf
It's not a secret anymore!