Servlets and birt [message #52682] |
Wed, 29 June 2005 19:07 |
Eclipse User |
|
|
|
Originally posted by: ned.abcdef.com
Hi,
I am trying to program a servlet to open a birt report to the browser.
Does anybody know if this is possible and if it is please show me where I
can find examples. I have been trying for awhile now and I have not
gotten any luck. Please help.
-Ned
|
|
|
|
|
|
|
|
Re: Servlets and birt [message #54642 is a reply to message #54616] |
Thu, 07 July 2005 06:41 |
Eclipse User |
|
|
|
Originally posted by: treydrake.yahoo.com
I'm using the 1.0 bits and rolled my own Web report handler. You can
set the BIRT engine home programatically; e.g.,
public class ReportServlet extends HttpServlet {
EngineConfig engineConfig = null;
ReportEngine engine = null;
public void init(ServletConfig config) throws ServletException {
engineConfig = new EngineConfig();
engineConfig.setEngineHome(
engineConfig.getServletContext().realPath("/WEB-INF"));
engine = new ReportEngine(engineConfig);
}
}
Also, there's no reason why you can't access reports via the File API
when deployed as a WAR.
public void doPost....
File reportFile = new File(pathToReport);
engine.openReportDesign(reportFile.getAbsolutePath());
....
}
trey
Erkki Lindpere wrote:
> Stanley Wang wrote:
>
>> Erkki Lindpere wrote:
>> Another disadvantage is that when you deploy through a WAR file, the
>> report design files then have to be accessed as resources instead of
>> using File API. So it is your choice to decide where to store the
>> files as the location is customizable.
>
>
> Is it even possible to use the BIRT 1.0 Report Engine when deployed as
> WAR? I ran into this problem yesterday -- seems I can't specify the
> Engine Home directory. This problem seems to have been solved in the
> current CVS version, though (by the way, which tag in CVS is for the 1.0
> release version?).
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04096 seconds