---------------------------------------------------------------------------------
Configure Pre-installed Tomcat with the Reporter Server 
---------------------------------------------------------------------------------
This Readme file is applicable for Netcool/Reporter 2.2.0.0 that works on the combination of Apache and Tomcat. This Readme file tells you how to set up pre-installed Tomcat with the Netcool/Reporter server. 


----------------------------------------------------------------
Important Note for Windows Users
----------------------------------------------------------------

Apache 2.0.59 requires a patch from Apache group in order to better support the IPV6 networking protocol. This Tomcat native patch, e.g. IPv6 Apache 2.0.59 for Win32, has been provided in the Netcool Reporter apache/tomcat interim patch, located under tomcat_home/bin. If you wish to use a different version of Apache in Netcool Reporter, then you will need to download a similar patch for your version of Apache and copy it to the same file directory. 


-------------------------------
Audience 
------------------------------

* Windows users who use a pre-installed Tomcat need to take actions as instructed in the section On Windows. 
* UNIX users who use a pre-installed Tomcat need to take actions as instructed in the section On UNIX.
* Windows users who use the supplied Tomcat need to read the section Additional Notes for Windows Users.


-------------------------------
Variable Definitions
-------------------------------

The following variables are referenced throughout this file:

* Tomcat_HOME - The root installation directory of your Tomcat application, for example, C:\apache-tomcat-5.5.26.
* JAVA_HOME - The root installation directory of your Java. 
* INFO_HOME - The root installation directory of Netcool/Reporter, for example, C:\http\htdocs\infospc or /opt/netcool/reporter/apache/htdocs/infospc.
* DOC_HOME - The directory one level above INFO_HOME, for example, C:\http\htdocs or /opt/netcool/reporter/apache/htdocs.
* BASEDIR - The base directory of your Tomcat. This is already set up in Tomcat_HOME\bin\setclasspath.bat when you installed Tomcat.


-----------------------
On Windows 
-----------------------
To configure Apache and Tomcat with the Reporter server:

1. Shut down both the Apache web server and Tomcat.

2. Edit the batch file %Tomcat_HOME%\bin\setclasspath.bat to append new entries to the end of CLASSPATH. This parameter will then appear as follows:
     CLASSPATH=...;%JAVA_HOME%\lib\dt.jar;INFO_HOME\packages;INFO_HOME\packages\taglibs-i18n.jar;%BASEDIR%\common\lib\jsp-api.jar;%BASEDIR%\common\lib\servlet-api.jar;

Note that you can leave the variables as they are in the above example. The system knows where to find the actual path values and will automatically fill them in to the paths.

3. Edit %Tomcat_HOME%\conf\server.xml to add the following line to the root level of the Host tags:

    <Context path="" docBase= "DOC_HOME" />

    Note: You must fill in the actual path value to the DOC_HOME variable. For example:

      <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
      	<Context path="" docBase= "C:\http\htdocs" />
           	 ...
		
          	... 
      </Host>



-----------------------
On UNIX 
-----------------------
To configure Apache and Tomcat with the Reporter server:

1. Shut down both the Apache web server and Tomcat.

2. Edit the shell file ${Tomcat_HOME}/bin/setclasspath.sh and append new entries to the end of CLASSPATH. The parameter will then appear as follows:

   CLASSPATH=...:$INFO_HOME/packages:$INFO_HOME/packages/taglibs-i18n.jar:../common/lib/jsp-api.jar:../common/lib/servlet-api.jar/

   Notes: 
	1. Use commas as the delimiter for separating each parameter value.
	2. The "../" signs mean the directory one level above the current directory.
	3. Leave the variables as they are in the above example. The system knows where to find the actual path values and will automatically fill them in to the paths.


3. Edit ${Tomcat_HOME}/conf/server.xml to add the following line to the root level of the Host tags: 

    <Context path="" docBase="DOC_HOME" />

    Note: You must fill in the actual path value to the DOC_HOME variable. For example:

	<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
        	<Context path="" docBase= "/opt/netcool/reporter/apache/htdocs" />
           		 ...
		
          		... 
              </Host>


-----------------------------------------------------
Additional Notes for Windows Users
-----------------------------------------------------
For users who have installed the supplied Tomcat during installing Netcool/Reporter, you still need to configure Tomcat in order to make the system work. There are two ways you can do this:

1. The Netcool/Reporter installer prompts for you to configure Apache and Tomcat during installing Netcool/Reporter. You can follow the installer to complete the process. 

2. If you do not do this via the installer, you are provided with a manual method. After the Netcool/Reporter installation, stop both Apache and Tomcat, and run the script as follows:

	Tomcat_HOME\util\Apache_TomcatConnector\ApacheConnectTomcat.bat
    
   You can then refer to the Netcool/Reporter 2.2.0.0. Administration Guide for Tomcat for more information about how to use that script.


