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/15 11:19:33 UTC
[jira] Created: (WW-2324) Jasper Reports Plugin is unable to set
the imageServletUrl parameter for HTML report using struts.xml config
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.11, 2.0.10, 2.0.9
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.
[jira] Assigned: (WW-2324) Jasper Reports Plugin is unable to set
the imageServletUrl parameter for HTML report using struts.xml config
Posted by "Mohammed Abdeali (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Resolved: (WW-2324) Jasper Reports Plugin is unable to set
the imageServletUrl parameter for HTML report using struts.xml config
Posted by "Don Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Don Brown resolved WW-2324.
---------------------------
Resolution: Fixed
Darn, so much for being method-chaining friendly. Fixed.
> 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
> Fix For: 2.1.1
>
>
> 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.
[jira] Commented: (WW-2324) Jasper Reports Plugin is unable to set
the imageServletUrl parameter for HTML report using struts.xml config
Posted by "Mohammed Abdeali (JIRA)" <ji...@apache.org>.
[ 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/user@struts.apache.org/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.