| Author |
generating pdf from jsp
|
Swathi Ram
Greenhorn
Joined: Sep 18, 2007
Posts: 27
|
|
Hey all..... I'm trying to figure out a way to generate a pdf file using struts 2. Does Struts facilitate this?? I came across some examples that used jasperreports........if anyone has info on this or any other suggestion or any sample code, please help. Thankyou. Swathi
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26144
|
|
Swathi, Struts is just a framework. You need to plugin a library to generate the PDF like Jasper or iText (open source PDF generator)
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Swathi Ram
Greenhorn
Joined: Sep 18, 2007
Posts: 27
|
|
I tried to implement the JasperReport to generate a pdf. I created the template and action class and put the following action mapping in my struts.xml <result-types> <result-type name="jasper" class="org.apache.struts2.views.jasperreports.JasperReportsResult" /> </result-types> <action name="myJasperTest" class="com.nursefinders.JasperAction"> <result name="success" type="jasper"> <param name="location">/jasper/jasper_output.jasper</param> <param name="dataSource">myList</param> <param name="format">PDF</param> </result> </action> But I don't have jasperreports.JasperReportsResult in my org.apache.struts2.views. How do I get that??? Do I need to have any plugin for that? If so which one? Thanks Swathi.
|
 |
 |
|
|
subject: generating pdf from jsp
|
|
|