[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.birt] Re: chart image lies localy

Juergen,

Look at this page:
http://wiki.eclipse.org/Servlet_Example_%28BIRT%29_2.1
Scroll down and there is a 2.2 example that has the new way of setting the image handler:


options.setImageHandler(new HTMLServerImageHandler());
			options.setBaseImageURL(req.getContextPath()+"/images");
			options.setImageDirectory(sc.getRealPath("/images"));

Jason

Juergen Leeb wrote:
I solved it by myself. With adding following in the class where I start up the report engine.

HTMLEmitterConfig htmlEmitterConfig = new HTMLEmitterConfig();
htmlEmitterConfig.setActionHandler(new HTMLActionHandler());
htmlEmitterConfig.setImageHandler(new HTMLServerImageHandler());
config.getEmitterConfigs().put(Constants.HTML_FORMAT, htmlEmitterConfig);

But HTMLEmitterConfig is declared as deprecated. Is there a alternative?



Juergen Leeb wrote:

Hi

I using the birt report engine in my webapp. I create my reports with eclipse.
The app server is glassfish running local while developing.
When I start the webapp from a browser located on an other Computer the image of the chart is not displayed.

The html source show that the image is referenced to C:

<img id="AUTOGENBOOKMARK_6"
src="file:/C:/01_SW/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/DBLackAuswertungen/images/custom1.jpg"

alt="" style=" width: 226.5pt; height: 185.25pt;"></img>

how can I make birt to referenz relative?

Thanks for helping!