You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Mohammed Abdeali (JIRA)" <ji...@apache.org> on 2007/11/16 15:41:34 UTC
[jira] Assigned: (WW-2324) Jasper Reports Plugin is unable to set
the imageServletUrl parameter for HTML report using struts.xml config
[ https://issues.apache.org/struts/browse/WW-2324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mohammed Abdeali reassigned WW-2324:
------------------------------------
Assignee: Don Brown
Hi Don,
Saw your post in the following thread so assumed you might be the right person to assign this to
http://www.mail-archive.com/user@struts.apache.org/msg63379.html
Apologies if not.
> Jasper Reports Plugin is unable to set the imageServletUrl parameter for HTML report using struts.xml config
> ------------------------------------------------------------------------------------------------------------
>
> Key: WW-2324
> URL: https://issues.apache.org/struts/browse/WW-2324
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - JasperReports
> Affects Versions: 2.0.9, 2.0.10, 2.0.11
> Environment: Windows XP SP 2, using struts 2.0.9 and Tomcat 5
> Reporter: Mohammed Abdeali
> Assignee: Don Brown
>
> This is the config from struts.xml
> <result name="success-html" type="jasper">
> <param name="location">WEB-INF/classes/jasper/our_jasper_template.jasper</param>
> <param name="dataSource">myList</param>
> <param name="format">HTML</param>
> <param name="imageServletUrl">/servlets/image?image=</param>
> </result>
> The problem is that the setter for this in the JasperReportResult class doesn't have a void return type, causing reflection problems and ultimately the parameter never gets set. This results in all the spacer and other images on the generated HTML report not being displayed
> The workaround is to return the JasperReportsResult directly from the action class e.g.
> public Result generateHTML() throws Exception {
> buildDataStore();
> JasperReportsResult result = new JasperReportsResult();
> result.setLocation("WEB-INF/classes/jasper/our_jasper_template.jasper");
> result = result.setDataSource("myList");
> result = result.setFormat("HTML");
> result = result.setImageServletUrl("/servlets/image?image=");
> return result;
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.