Specifying reporthome for JReport Server in a Java EE environment

JReport Server requires a reporthome as its working space to hold the entire JReport runtime environment, including the server properties, configuration files and resources. The package jrenv.jar that contains the entire JReport runtime environment will be extracted to the specified reporthome when initializing JReport Server. The reporthome can be any location on the disk where JReport Server has read and write privileges.

You do not have to specify a reporthome for JReport Server since it will create a default reporthome location <user.home>/.jreport/default.

However, JReport Server enables you to customize the reporthome location before creating the JReport Server WAR/EAR using the provided tool. You can either specify reporthome directly or specify the implementation of the jet.server.api.http.CustomizedServerEnv interface.

Note: Make sure that the reporthome for the integrated JReport Server is different from that of the standalone JReport Server.

Interface CustomizedServerEnv

The jet.server.api.http.CustomizedServerEnv interface can be used for specifying the JReport Server reporthome and for setting the server properties in a Java EE environment. It contains two methods:

If you specify the implementation of this interface, JReport Server will obtain not only reporthome but also server properties.

Three ways of specifying reporthome

There are three ways of specifying reporthome directly or the implementation of the jet.server.api.http.CustomizedServerEnv interface:

The following introduces several methods of specifying reporthome or implementation of CustomizedServerEnv: