exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, "images/jasper_tmp/");
exporter.setParameter(JRHtmlExporterParameter.IMAGES_URI, "/images/jasper_tmp/");
I’m using jasper report in a GWT project.
My PROD platform is TOMCAT 5.5 on Win2003.
I’ve tried on TOMCAT 7 / Windows 7 too.
These lines are called from the server side of the application in a servlet. So I cannot use static method from com.google.gwt.core.client.GWT.
It seems that my problem is similar as jasper reports with HTML Format
In DEV mode, in Eclipse, every things is ok. All images are display when I get my jasperreport in HTML.
In my PROD environment, it is a TOMCAT server, images in the jasper report are not display in HTML. On PROD server, exporter.setParameter(JRHtmlExporterParameter.IMAGES_DIR_NAME, "images/jasper_tmp/"); generate images/jasper_tmp/ in %TOMCAT_HOME%, not in the deployment directory of my app.
On filesystem, I’ve %TOMCAT_HOME%/images/jasper_tmp/, I expect %TOMCAT_HOME%/webapps/my_project/images/jasper_tmp/.
How could I pass the images as parameters ? (if it is possible)… as suggested in the answer.
Do I need to install Apache Web Server to make any rewrite rule ? My PROD server have TOMCAT only.
Thanks.
Please use
Firefox with Firebug PluginorChrome with Chrome Dev Toolor IE8 Dev Tool to investigate whether itsimage pathorcssorjavascripterror and update the question with more details.Firebug – getfirebug.com
Chrome – https://developers.google.com/chrome-developer-tools/docs/overview
IE8 – http://blogs.msdn.com/b/ie/archive/2008/03/07/improved-productivity-through-internet-explorer-8-developer-tools.aspx
1) You need not go for apache proxying with rewrite rules unless its performance requirement of serving static resources.
2) You can tweak you image paths for DevMode and Production Mode with GWT.isProdModel , GWT.getHostPageBaseURL(), GWT.getModuleName() or getModuleBaseForStaticFiles()
Edit
The above information helps on client side. On server side the Jetty server context path varies from you webapp deployment in server like tomcat. You can fix it to be same as tomcat by following the instructions mentioned here https://groups.google.com/d/topic/google-web-toolkit/a8OsRmMSaMg/discussion