Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Two webapps or one big webapp
JamesBond
If my application webapp runs the report and I want the viewer servlet to render the document. What is the best or preferred way to deploy ?
1) Create one big war file?
2) Create two web apps like
Tomcat/webapp/myapp
Tomcat/webapp/birt-viewer
I guess i have to copy the RE in two places. am I right ?
3) Ideally I want to use one copy of the BIRT. and I should be able to execute the report in development(coping the folder structure under tomcat webapp) and in production (using war)
Find more posts tagged with
Comments
JasonW
in your case 2, you may be able to make your application use the birt viewer home like:
EngineConfig config = new EngineConfig();
String pt="";
ServletContext ctx = sc.getContext("/birt-viewer");
if( ctx != null ){
pt = ctx.getRealPath("/");
}
pt= pt +"WEB-INF/platform/";
pt = pt.replaceAll("","/");
config.setBIRTHome(pt);
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
birtEngine = factory.createReportEngine( config );
This assumes that the crossContext for both apps are set to true.