Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to deploy BIRT without an application server? (Newbie trying to use BIRT in a non-AS environment)
How to deploy BIRT without an application server? [message #506573] Fri, 08 January 2010 05:43 Go to next message
Kunal Ashar is currently offline Kunal AsharFriend
Messages: 1
Registered: January 2010
Junior Member
Please forgive the newbie question.

I'm attempting to use/deploy BIRT into my current web-based Java application. I'm using Eclipse as my development environment.

However, my application *does not* use an application server. Instead, it relies on JSPs served by a traditional web server (Apache) with backend POJOs. Ideally, I'd like my JSPs to gather data from form field variables in a browser, pass them back to the POJOs, which would run the reporting tool, generate an HTML report file and serve it back to the the browser.

Is it possible to integrate BIRT into such an environment? If so how? Is there a tutorial or a detailed set of instructions somewhere?

Thanks in advance.
Re: How to deploy BIRT without an application server? [message #506658 is a reply to message #506573] Fri, 08 January 2010 14:55 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Kunal,

If you are just using a POJO you should be able to start the OSGI
platform which will have to be located somewhere on your system and call
the report engine. Like:


IRunAndRenderTask task=null;
IReportEngine engine=null;
EngineConfig config = null;

try{
config = new EngineConfig( );

config.setBIRTHome(" C:\\birt\\birt-runtime-2_5_1\\birt-runtime-2_5_1\\ReportEngi ne ");
//very expensive, should only be done once
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(
IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );

IReportRunnable design = null;
//Open the report design

design = engine.openReportDesign("Reports/JsInclude.rptdesign");

//Create task to run and render the report,
task = engine.createRunAndRenderTask(design);
task.setLocale(new Locale("en", "US"));
task.setParameterValue("parm1", "value2");

HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFileName("output/resample/includejs.html");
options.setOutputFormat("HTML");
task.setRenderOption(options);
task.run();
task.close();
engine.destroy();
}catch( Exception ex){
ex.printStackTrace();
}
finally
{

Platform.shutdown( );
}

The only issue with this approach is that Platform startup and shutdown
is very expensive, so if you are can start it when it starts and shut it
down when its finished that is the best approach, then each POJO can
just create a new task, execute it and then close the task. Let you
startup code start the platform and create the engine.

Kunal Ashar wrote:
> Please forgive the newbie question.
>
> I'm attempting to use/deploy BIRT into my current web-based Java
> application. I'm using Eclipse as my development environment.
>
> However, my application *does not* use an application server. Instead,
> it relies on JSPs served by a traditional web server (Apache) with
> backend POJOs. Ideally, I'd like my JSPs to gather data from form field
> variables in a browser, pass them back to the POJOs, which would run the
> reporting tool, generate an HTML report file and serve it back to the
> the browser.
>
> Is it possible to integrate BIRT into such an environment? If so how? Is
> there a tutorial or a detailed set of instructions somewhere?
>
> Thanks in advance.
Previous Topic:Changing dynamically pie chart size
Next Topic:non-transparent image transfer
Goto Forum:
  


Current Time: Thu Sep 19 08:33:31 GMT 2024

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

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

Back to the top