[ 
https://issues.apache.org/struts/browse/WW-2324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42669
 ] 

Mohammed Abdeali commented on WW-2324:
--------------------------------------

Here is a link further explaining the issue and the exception seen

http://www.mail-archive.com/[EMAIL PROTECTED]/msg63379.html

> 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
>
> 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.

Reply via email to