### Deploying to GlassFish V2 b58g

The example directory paths listed below are based on Solaris or Linux (referred to as UNIX). The instructions are applicable to both UNIX and Windows installations; however, the format of the paths for Windows would use the Windows format, i.e. `C:\JReport\Server` instead of `/opt/JReport/Server`.

It is assumed that the JReport Enterprise Server WAR file jreport.war is located in the `/opt/JReport/Server/bin/distribute` directory. To create the WAR file refer to the instructions in Building a WAR/EAR file to include a self-contained JReport Enterprise Server.

To deploy JReport Enterprise Server to GlassFish V2 b58g:

1. Start the GlassFish in the default domain1 and then launch the Admin Console.
2. In the Deployment section, click Deploy Web Application (.war).
3. On the displayed page, click Browse under the default first location to select the WAR file jreport.war.
4. Leave Application Name and Context Root as jreport and jreport.
5. Select server in the Virtual Servers field.
6. Click OK. The OK button will then be replaced by the Processing button.
7. After the processing completes, an application named jreport is listed in the Deployed Web Applications table. By clicking the Launch action in the same row you can access JReport Enterprise Server. Or you can use the following URLs:

   `http://host:8080/jreport
   http://host:8080/jreport/admin/index.jsp
   http://host:8080/jreport/jinfonet/index.jsp`

#### Troubleshooting

If you run into some problems when using the GlassFish V2 b58g, send the log files of JReport Enterprise Server to support@jinfonet.com. The following procedure illustrates how to generate the log files:

1. Start the GlassFish in the default domain1 and then launch the Admin Console.
2. In the console tree, click Application Server.
3. Go to the JVM Settings tab, and then click JVM Options.
4. In the JVM Options section, click Add JVM Option, and then type -Dlogall=true. Click Save to save your changes.
5. Restart GlassFish V2 b58g and try to reproduce the problem.
6. After reproducing the problem, send support@jinfonet.com the log files in `reporthome/logs`.

   The GlassFish log file may also help to identify the problem. It is /opt/glassfish/domains/domain1/logs/server.log.