You can embed a self-contained JReport Server into your WAR.
For example, here you can create a WAR named MyApp.war, and then embed a self-contained JReport Server inside it. The structure of your WAR may be as follows:
MyApp.war
WEB-INF/
web.xml
lib/ -- This folder contains all resources in the JReport Server library and your other jar files.
classes/ -- This folder contains your servlet classes.
../../asset/images/
jsp/
If you put the JReport WAR related JSPs to a sub folder, for example, jreport, and this time the structure of your WAR may be as follows:
MyApp.war
WEB-INF/
web.xml
lib/ -- This folder contains all resources in the JReport Server library and your other jar files.
classes/ -- This folder contains your servlet classes.
../../asset/images/
jreport/
admin/
dhtmljsp/
jinfonet/
...
To run JReport reports, you must do the following configurations:
<context-param>
<param-name>autoDetectServletPath</param-name>
<param-value>false</param-value>
</context-param>
You should add listener into the web.xml as follows:
<listener>
<listener-class>jet.server.servlets.JRServerContextListener</listener-class>
</listener>