#### Integrating by building a user WAR and embedding a self-contained JReport Server

You can embed a self-contained JReport Server into your WAR.

##### Structure of the user 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:

- Add the following entry into web.xml:
  `<context-param>
  <param-name>autoDetectServletPath</param-name>
  <param-value>false</param-value>
  </context-param>`

##### WEB-INF/web.xml in the user WAR

You should add listener into the web.xml as follows:

`<listener>
<listener-class>jet.server.servlets.JRServerContextListener</listener-class>
</listener>`