You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by suhaib999 <su...@gmail.com> on 2012/04/27 12:18:49 UTC
Re: Jasper Report Problem in HTML format
Hi I am into the same problem, images not getting displayed
The link you refer and got it to work, how does this fit inside the struts
action class code.
In my action I am returning "success", where do you put the below code,
where is the method
buildDataStore() defined in which class..?
------------------------------------------------------------------------
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;
}
--
View this message in context: http://struts.1045723.n5.nabble.com/Jasper-Report-Problem-in-HTML-format-tp3474975p5669906.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org