The self-contained JReport Server can be deployed as a single EAR file. After specifying the reporthome and configuring the database information, you can build the EAR file using the tool makewar.bat/makewar.sh in <install_root>\bin
. To generate the EAR file, execute the command with the buildEar parameter, for example:
makewar.bat/makewar.sh buildEar
For example, here you can create a JReport Server EAR file named jreport.ear. The structure of the JReport Server EAR is as follows:
jreport.ear
META-INF/application.xml
jreport-lib/ -- This folder contains all resources in the JReport Server library.
jreport.war
META-INF/MANIFEST.MF
WEB-INF/web.xml
admin/
jinfonet/
dhtmljsp/
Following the Java EE standard, you should configure the META-INF/application.xml file before deploying the EAR:
|
Since the JReport Server library is included in jreport-lib of the EAR layer, you must specify Class-Path in the META-INF/MANIFEST.MF file. The contents below should be included in the MANIFEST.MF file:
Class-Path: jreport-lib/jrenv.jar jreport-lib/JRESServlets.jar jreport-lib/JREngine.jar ...
Class-Path is a list of all packages in the JReport Server library. Each package name should start with the prefix jreport-lib/, and you should use a blank space to separate package names.
The contents in the web.xml of the JReport Server EAR are the same as the contents in web.xml of the JReport Server WAR. See the section Integrating by building a JReport Server WAR for details.