There are two ways of creating a WAR or EAR to include a self-contained JReport Server:
The self-contained JReport Server is based on a library. The library contains all class packages required by the JReport Server runtime, such as jrenv.jar, JRESServlets.jar, JREngine.jar, and JRWebDesign.jar. In the library, jrenv.jar contains the entire JReport runtime environment, and is the key to the self-contained integration solution. With the self-contained solution, you do not have to specify the JReport Server installation root as the reporthome.
When you create a JReport Server WAR/EAR file using the provided tool, the jrenv.jar package will be automatically put into the WAR/EAR, and will be extracted to the specified reporthome when initializing JReport Server.
The following is the structure of the jrenv.jar package:
jrenv.jar
workspace/ -- This is the root folder.
bin/ -- This folder contains the license file jslc.dat and configuration files, such as LogConfig.properties and redirect.properties.
lib/ -- This folder contains jar files needed by applets, such as view12.jar and chart.jar.
template/ -- This folder contains template files.
profiling/report/ -- This folder contains profiling report files.
jreports/ -- This folder contains demo reports or pre-published reports.
db/ -- This folder contains demo database for demo reports.
help/ -- This folder contains help documents.
The bin/, lib/, and template/ folders are necessary for the JReport runtime, while the profiling/, jreports/, db/ and help/ folders are optional.
Note: There is a parameter in self-contained WAR/EAR - autoDetectServletPath. It is used to dynamically detect and modify servlet path based on context path of self-contained WAR/EAR when deploying the WAR/EAR to a J2EE application server. This property is enabled by default, and the actual servlet path will be concatenating "context path" with "default servlet path" set in server.properties. If you do not want this way, you can disable the feature using either of the following ways:
<install_root>\bin
.The following are topics covered in the section: