Tomcat to Jaguar CTS
Many developers are learning JSP and are seeing the benefits of developing
with JSP. JSP offers you the ability to run on almost any platform with
almost any Web server. This openness of JSP along with the strengths
of the Java programming language means you can do almost anything with
JSP.
This exercise will show you the needed tricks to install Tomcat JSP
container to make calls to Sybase's EAServer.
Download Tomcat

Extract Zipped File
Using WinZip extract the zipped file to the c:\ drive. make sure you extract with folder names intact. The default location is c:\jakarta-tomcat-3.2.1

Important Files
Tomcat uses XML files to configure its startup. We need to modify the file that tells the Web server which port to run on so it does not conflict with existing Web servers. Under the configuration directory we can modify the server XML. C:\jakarta-tomcat-3.2.1\conf Go into the default conf directory and open server.xml with a text editor. You will find the section below.
<!-- Normal HTTP -->
<Connector className="org.apache.tomcat.service.PoolTcpConnector">
<Parameter name="handler" value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
<Parameter name="port" value="8100"/>
</Connector>
You need to set the value of the port to a port that is not being used. We set ours to 8100. Note IIS will be using port 80, Jaguar uses port 8080 and JRun uses port 8000.
Boot Strap Jaguar Client
If you do not set up Tomcat to run with Jaguar's jagclient.zip classes you will get minor code errors. So we must boot strap these classes. To do this we need to modify how Tomcat stats. Under the bin directory you will find several bat files to stop and start Tomcat. C:\jakarta-tomcat-3.2.1\bin Go into the default bin directory and open tomcat.bat. This file is used to start and stop tomcat.

Set BOOTCLASSPATH Value
At the top of the bat file you need to add bootclasspath information. Add it after the set _CLASSPATH. The most important thing is adding jagclient.zip and making sure it's not in front of other Tomcat files.
rem ----- Save Environment Variables That May Change ------------------------
set _CP=%CP%
set _TOMCAT_HOME=%TOMCAT_HOME%
set _CLASSPATH=%CLASSPATH%
set BOOTCLASSPATH=C:\jakarta-tomcat-3.2.1\lib\ant.jar
set BOOTCLASSPATH=%BOOTCLASSPATH%;C:\jakarta-tomcat-3.2.1\lib\jasper.jar
set BOOTCLASSPATH=%BOOTCLASSPATH%;C:\jakarta-tomcat-3.2.1\lib\jaxp.jar
set BOOTCLASSPATH=%BOOTCLASSPATH%;C:\jakarta-tomcat-3.2.1\lib\parser.jar
set BOOTCLASSPATH=%BOOTCLASSPATH%;C:\jakarta-tomcat-3.2.1\lib\servlet.jar
set BOOTCLASSPATH=%BOOTCLASSPATH%;C:\jakarta-tomcat-3.2.1\lib\webserver.jar
set BOOTCLASSPATH=%BOOTCLASSPATH%;C:\Program Files\Sybase\Shared\Jaguar
CTS 3.5\Client\jagclient.zip
set BOOTCLASSPATH=%BOOTCLASSPATH%;%JAGUAR%\html\classes\mail.jar
set BOOTCLASSPATH=%BOOTCLASSPATH%;%JAGUAR%\html\classes\activation.jar
set BOOTCLASSPATH=%BOOTCLASSPATH%;%JAGUAR%\html\classes\xml.jar
set BOOTCLASSPATH=%BOOTCLASSPATH%;%JDK_LATEST%\jre\lib\rt.jar
set BOOTCLASSPATH=%BOOTCLASSPATH%;%JDK_LATEST%\jre\lib\jaws.jar
set BOOTCLASSPATH=%BOOTCLASSPATH%;%JDK_LATEST%\jre\lib\i18n.jar
set BOOTCLASSPATH=%BOOTCLASSPATH%;%JDK_LATEST%\lib\tools.jar
set BOOTCLASSPATH=%BOOTCLASSPATH%;%JDK_LATEST%\lib\dt.jar
set BOOTCLASSPATH=%BOOTCLASSPATH%;%JAGUAR%\java\classes
set BOOTCLASSPATH=%BOOTCLASSPATH%;%JAGUAR%\html\classes
echo Using bootclasspath: %BOOTCLASSPATH%
rem ----- Verify and Set Required Environment Variables ---------------------
Further down in the bat file you will find a server location for starting
Tomcat. You need to modify the line by adding the bootclasspath as shown
below.
:startServer
echo Starting Tomcat in new window
if "%2" == "-security" goto startSecure
%_STARTJAVA% -Xbootclasspath:"%BOOTCLASSPATH%" %TOMCAT_OPTS%
-Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat
%2 %3 %4 %5 %6 %7 %8 %9
goto cleanup
Setting Environment Variable
You need to add an environment variable tomcat_home and set it equal to the install location of Tomcat. Restart after setting environment variable.

Start Tomcat
Simply double click the startup.bat file in the %tomcat_home%\bin. Tomcat is ready to run JSP pages that call Jaguar. All JSP pages are stored under webapps.
