Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How to set the port for birt ?
Elkaras
hello...
I visit here, so much and have searched about birt report settings...but I couldn't find one ..
so I'm leaving this.
" the question is .."
in java source, a data renders to xlsx format..
it works on localhost....as localhost:8080 ..
but problem is ...it doesn't work on https ...
it uses two different port numbers ...
443 and 9090 ..
443 is for web ..
and 9090 will be used for birt ! , I need help ..
========the source is like this ..
public void publish(String designDocPath, Object parameters, String format, HttpServletRequest req, OutputStream fos)
throws EngineException {
designDocPath = BirtParameter.getDesignDocPath(designDocPath);
IReportRunnable runnable = engine.openReportDesign(designDocPath);
IRunAndRenderTask runAndRenderTask = engine.createRunAndRenderTask(runnable);
if (req != null) {
runAndRenderTask.getAppContext().put(EngineConstants.APPCONTEXT_BIRT_VIEWER_HTTPSERVET_REQUEST, req);
}
DataSet ds = (DataSet) parameters;
try {
runAndRenderTask.getAppContext().put("REPORT_DATASET", ds);
} catch (java.lang.ClassCastException cee) {
cee.printStackTrace();
}
if("xlsx".equals(format)) {
EXCELRenderOption option = new EXCELRenderOption();
option.setOutputStream(fos);
/*option.setOutputFormat("xls");
//option.setOutputFileName("output/native.xls");
//option.setOption( IExcelRenderOption.OFFICE_VERSION, "office2007");
//option.setOption("excelRenderOption.hideGridlines",true);
option.setOption(IExcelRenderOption.OFFICE_VERSION, "office2007");
option.setOption(IRenderOption.EMITTER_ID,"org.eclipse.birt.report.engine.emitter.nativexls");
runAndRenderTask.setRenderOption(option);*/
//option.setWrappingText(true);
//option.setEnableMultipleSheet(true);
option.setOutputFormat("xlsx");
option.setEmitterID("uk.co.spudsoft.birt.emitters.excel.XlsxEmitter");
runAndRenderTask.setRenderOption(option);
} else {
PDFRenderOption option = new PDFRenderOption();
option.setOutputStream(fos);
option.setOutputFormat(format);
runAndRenderTask.setRenderOption(option);
}
try {
runAndRenderTask.run();
} finally {
Logger.info.println("BirtPublisher render format:" + format);
runAndRenderTask.close();
}
}
========================================================================================================
is there something wrong ? or missing ?
Find more posts tagged with
Comments
johnw
This isn't a function of BIRT. This is a setting in your Servlet Container (WebSphere, Tomcat, JBoss, etc). You can usually configure this from the web.xml or servlet.xml for your application, and configure all the necessary certificates for SSL.
Elkaras
thanks... so I set the port and domain at javascript, for call the viewer ^-^