BIRT can be deployed on any application server, including Apache Tomcat. Now we want to open source Birt-Runtime [birt is open source, and the following files are available on the official website, in addition, whatever you like, you can use the example "WebViewerExample" provided in the folder to deploy it under Tomcat. First, copy the file to the webapps folder under the Tomcat installation directory. For the sake of simplicity, we recommend that you change the folder name to "birt" for ease of viewing .. If you are using Tomcat 6.x series, you need to add commons logging library. To the WebViewerExample/WEB-INF/lib directory under Tomcat.
Restart Tomcat, open http: // localhost: 8080/birt/, and click "View Example" to View the Birt Example.
OK. The message indicating success is displayed.
(This indicates that we have succeeded in the first step. Next, we will release our self-designed reports to this application)
Put your own birt report file. rptdesign generated by using eclipse into the birt directory,
Input: http: // localhost: 8080/birt/frameset? _ Report = Your. rptdesign
[If you do not pay attention to the url address, this error may occur .]
There is no report design object available.
Org. eclipse. birt. report. exception. ViewerException: There is no report design object available.
Note that the address is accessed with two underscores instead of one.
Http: // localhost: 8080/birt/frameset? _ Report = 2dcode. rptdesign
[If the address is correct, you can access it normally. However, if an error occurs]
The report file: D: \ tomcat-6.0 \ webapps \ Birt/2dcode. rptdesign does not exist or contains errors
File not found, it must be the path is incorrect. We can set our Birt storage address in webapps \ Birt \ WEB-INF.
<Context-param>
<Param-Name> birt_viewer_working_folder </param-Name>
<Param-value>/report/</param-value>
</Context-param>
In addition, there is a test. rptdesign and index. jsp under the Birt directory, you can enter index. jsp to see the test results.
Note that:
<Data-sources>
<ODA-data-source extensionid = "org. Eclipse. Birt. Report. Data. ODA. JDBC" name = "Data Source" id = "43">
<Property name = "odadriverclass"> com. MySQL. JDBC. Driver </property>
<Property name = "odaurl"> JDBC: mysql: // localhost: 3306/test </property>
<Property name = "odauser"> root </property>
<Encrypted-property name = "odapassword" encryptionid = "base64"> zwxpdu = </encrypted-property>
<Property name = "OdaConnProfileName"> </property>
<Property name = "odaJndiName"> java: comp/env/jdbc/birtDB </property>
</Oda-data-source>
</Data-sources>
Jdbc driver package
<Propertyname = "odaDriverClass"> com. mysql. jdbc. Driver </property>
To
Birt-runtime-2_3_0 \ WebViewerExample \ WEB-INF \ platform \ plugins \ org. eclipse. birt. report. data. oda. jdbc_2.0 \ drivers.