Raja Kanapaka
Raja Kanapaka

Reputation: 11

Birt chart not showing on web application after deploying .war file on Tomcat server

I have done one web application using BIRT(Birt runtime 4.2) reports. All the reports accessible properly in local machine as well as through my IP. After creating .war file, I deployed it on my production server(Tomcat8) then BAR chart is not visible it is showing a cross mark(screenshot) instead of the chart, where as if click on export as PDF the report is coming on PDF document. Please help me out.

NOTE: The reports are working properly in application as well as in PDF.

Thanks in Advance..

Upvotes: 1

Views: 1077

Answers (1)

Danilo Tommasina
Danilo Tommasina

Reputation: 1760

Based on the comments, easiest setup I could imagine in order to avoid issues (including issues with mixed content):

  • Setup tomcat to serve HTTP requests on port 8080 (context /myApp, do not add any HTTPS setup in tomcat)
  • Set BIRT's baseURL to https://apacheServerHost/myApp
  • Add the following to your httpd.conf apache config:

    ProxyPass /myApp http:tomcatServerIp:8080/myApp

    ProxyPassReverse /myApp http:tomcatServerIp:8080/myApp

  • Add the following to your httpd-ssl.conf apache config:

    ProxyPass /myApp http:tomcatServerIp:8080/myApp

    ProxyPassReverse /myApp http:tomcatServerIp:8080/myApp

Why this?

  • The browser knows nothing about the tomcat server, it will only 'see' your apache server
  • When you connect to the BIRT viewer over HTTP using the apacheServer host URL, all images will be loaded by HTTPS (using baseURL path), base page HTTP loading from HTTPS is ok.
  • When you connect to the BIRT viewer over HTTPS using the apacheServer host URL, all images will be loaded by HTTPS (using baseURL path), which is ok

Upvotes: 1

Related Questions