• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

downloading generated report in JSF

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

how I do download a generated data like a file.
I prefer to do it in JSF than JSP/servlet.
When user clicks on the first JSF "download report" button and server should display the second JSF and (popup) dialog window "save or open".


thanks.
 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would use a servlet and be done with it. JSF is overkill.
 
chono ken
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
any idea, please.

I need to do it in JSF.

thanks.
 
Gerardo Tasistro
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What I do is create a normal <form> using a <f:verbatim> tag. Then form targets _blank and the href is a servlet which gets the report parameters (or can query them from session)
 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"To a small child with a hammer, every problem looks like a nail."

JSF isn't designed to do file transfers or render reports. It's geared towards UI-type stuff. For what you want, a servlet is simpler.

Just because the UI components of your webapp are JSF doesn't mean you must force everything in the webapp to go through JSF. After all, JSF itself is just a servlet and some support libraries.
 
chono ken
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I figured this out.
Here's link, where I've found solution of the problem.
http://forum.java.sun.com/thread.jspa?threadID=662942
May be help to someone, who has similar problem.
[ February 28, 2006: Message edited by: chono ken ]
reply
    Bookmark Topic Watch Topic
  • New Topic