Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Servlets and birt
Servlets and birt [message #52682] Wed, 29 June 2005 19:07 Go to next message
Eclipse UserFriend
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 #52789 is a reply to message #52682] Wed, 29 June 2005 21:49 Go to previous messageGo to next message
Erkki Lindpere is currently offline Erkki LindpereFriend
Messages: 90
Registered: July 2009
Member
Ned wrote:
> 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
>
BIRT already includes (or was it a separate download only?) an example
web app which has servlets for doing this. I didn't look at those
servlets though, but based my solution on this documentation:
http://www.eclipse.org/birt/index.php?page=deploy/engine.htm l

The example application is a bad example in some aspects: storing
..rptdesign files outside WEB-INF directory by default so the datasource
parameters in the file can easily be viewed by anyone.

Erkki
Re: Servlets and birt [message #52815 is a reply to message #52789] Thu, 30 June 2005 00:24 Go to previous messageGo to next message
Stanley Wang is currently offline Stanley WangFriend
Messages: 81
Registered: July 2009
Member
Erkki Lindpere wrote:
> Ned wrote:
>
>> 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
>>
> BIRT already includes (or was it a separate download only?) an example
> web app which has servlets for doing this. I didn't look at those
> servlets though, but based my solution on this documentation:
> http://www.eclipse.org/birt/index.php?page=deploy/engine.htm l
>
> The example application is a bad example in some aspects: storing
> .rptdesign files outside WEB-INF directory by default so the datasource
> parameters in the file can easily be viewed by anyone.
>
> Erkki

There is a viewer web application for you to use out-of-the-box. The
source is at org.eclipse.birt.report.viewer if you want to dig further.
Ideally, one needs a report server to store and manage report designs.
Storing the design files into WEB-INF has some disadvantages. One is
that you lose the freedom of updating the report, as each time you
change a report, you need to redeploy the application (only
technically). 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.


Stanley Wang
BIRT Engine
Re: Servlets and birt [message #53007 is a reply to message #52682] Thu, 30 June 2005 18:10 Go to previous messageGo to next message
Jun Zhai is currently offline Jun ZhaiFriend
Messages: 74
Registered: July 2009
Member
Ned,

You can either refer to the Birt engine online doc or check the Birt
viewer's source code at "org.eclipse.birt.report.viewer" plugin.

All you need is the logic inside file
" /birt/WEB-INF/classes/org/eclipse/birt/report/viewer/aggrega tion/layout/EngineFragment.java "

Jun Zhai
Re: Servlets and birt [message #53032 is a reply to message #52789] Thu, 30 June 2005 18:20 Go to previous messageGo to next message
Jun Zhai is currently offline Jun ZhaiFriend
Messages: 74
Registered: July 2009
Member
Erkki,

Thanks for bring this issue up. As Stanly suggested above, we can not put
report design file inside WEB-INF dir and probably have to rely on the
model api to store the sensitive info encrypted.

We think your input provides us good opportunity to improve our work
efficiently. Feel free share with us your other points.

Jun Zhai
Re: Servlets and birt [message #54616 is a reply to message #52815] Thu, 07 July 2005 05:40 Go to previous messageGo to next message
Erkki Lindpere is currently offline Erkki LindpereFriend
Messages: 90
Registered: July 2009
Member
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?).
Re: Servlets and birt [message #54642 is a reply to message #54616] Thu, 07 July 2005 06:41 Go to previous messageGo to next message
Eclipse UserFriend
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?).
>
Re: Servlets and birt [message #56207 is a reply to message #54616] Mon, 11 July 2005 19:19 Go to previous messageGo to next message
Stanley Wang is currently offline Stanley WangFriend
Messages: 81
Registered: July 2009
Member
We actually found no problem for Tomcat and Websphere WAR deployment
using BIRT 1.0. We ran into issues in Weblogic, which prompted the
recent changes in CVS.

Stanley Wang
BIRT Engine

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?).
>
Re: Servlets and birt [message #56432 is a reply to message #56207] Tue, 12 July 2005 08:05 Go to previous message
Erkki Lindpere is currently offline Erkki LindpereFriend
Messages: 90
Registered: July 2009
Member
I'm also using Weblogic, but the problem for me actually disappeared
because I realised that I have to deploy the .war with staging, which
copies the files into a directory on each server.
Previous Topic:Real binary data in ODA datasource
Next Topic:Anybody using MySQL with BIRT?
Goto Forum:
  


Current Time: Sat Jul 27 18:19:06 GMT 2024

Powered by FUDForum. Page generated in 0.05482 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top