Building a WAR/EAR file to include a self-contained JReport Server

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

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:

The following are topics covered in the section: