This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes datasource for jasper report in struts.xml with struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "datasource for jasper report in struts.xml with struts2" Watch "datasource for jasper report in struts.xml with struts2" New topic
Author

datasource for jasper report in struts.xml with struts2

discus ma
Greenhorn

Joined: Nov 23, 2011
Posts: 1
HI,

I am trying to run jasper report from Struts2. I am using embeded sql in my jasper report as the datasource.

In the STRUTS.xml file, I define the action as following ( This is something I found in the web, just use it as an example).

My question:

Since I am using embed sql defined in my jasper report as datasource. How do I specify the value for the param "dataSource" here in STRUTS.xml?
Any help is greatly appreciated !!


<package name="default" namespace="/" extends="jasperreports-default">
<action name="myJasperTest">
<result name="pdf" type="jasper">
<param name="location">/jasper/our_compiled_template.jasper</param>
<param name="dataSource">myList</param>
<param name="format">PDF</param>

<param name="contentType">application/pdf</param>
<param name="contentDisposition">filename="document.pdf"</param>
</result>

</action>


 
jQuery in Action, 2nd edition
 
subject: datasource for jasper report in struts.xml with struts2
 
Similar Threads
Problem in struts2-jasperreports
Problem in using "exportParameters" in struts2
Struts 2.2 jasper report filename issue
Problem in iReport3.7.1 ,Struts2
How to embed jasper report in jsp page when using struts2-jasperreports-plugin