I have attempted to install Tomcat on my Win98 system in conjunction with jdk1.1.8. (I don't know which version of Tomcat and I don't know how to find out; it was the release build available 11/15, probably 3.1)
I unzipped to the C: drive, set the %TOMCAT_HOME% to c:\jakarta-tomcat, set %JAVA_HOME% to C:\jdk1.1.8, and added many items to my CLASSPATH (see autoexec.bat below.) The jdk1.1.8\bin was already in the PATH.
At different times (with the same result) I ran the startup.bat from both Windows Explorer and a DOS window (and then re-ran after fixing the out-of-environment-space error by adjusting the Initial Environment memory).
The results I got were a separate DOS window titled "Finished-startup",
which read
Starting Tomcat in a separate
window
Using classpath: C:\jakarta-tomcat\classes.....<<major
snip>>
Invalid directory
I tried running the sample jsp and servlet program found on C:\jakarta-tomcat\doc\appdev\sample\web\index.html to no avail.
The jsp shows unprocessed jsp commands; clicking on the servlet example yielded "Netscape is unable to find the file or directory named /CI/jakarta-tomcat/doc/appdev/sample/web/hello". I couldn't find the file either, but I did find "Hello.java" under doc\appdev\sample\src. I moved it, tried again, no luck, renamed it "hello.java", no luck, changed the main class declaration to the lower case hello, compiled it, no luck.
A different plan of attack: I type in the "HelloWorld"example from Marty Hall's book; it won't compile- unable to import javax.servlet.*, and javax.servlet.http.*, plus all of the associated error messages.
At one point I tried modifiying the startup.bat, still no luck.
I finally deleted all the relevant directories, did a fresh re-install, with a clean autoexec.bat, and it's still not working. But I'm getting a slightly different error message when trying to compile the Marty's sample HelloWorld code:
error: File .\ServletException.class does not contain type ServletException as expected, but type javax.servlet.ServletException. Please remove the file, or make sure it apppears in the correct subdirectory of the class path.
I deleted the ServletException class and tried to re-compile and got a similar error:
error: File .\ServletException.class does nto contain type ServletException as expected, but type javax.servlet.ServletException. Please adjust the class path so that the file does not appear in the unnamed package.
I really don't know what that means. I don't think Tomcat has started running, but I don't know how to check.
A few other miscellaneous notes:
- I included the %JAVA_HOME%\tools.jar in my CLASSPATH, but tools.jar dones not exist anywhere on my hard drive. But it was in the startup.bat where I modeled my CLASSPATH settings from, so I left it in.
- My CLASSPATH also lists %TOMCAT_HOME%\classes; I don't have this directory.
- Marty Hall's book says the servlets should be placed in the install_dir/webpages/WEB-INF/servlets directory. I don't have one. The example servlets are found in C:\jakarta-tomcat\src\javax\servlet directory, so that's where I put my HelloWorld
MANY THANKS to everyone; I sincerely appreciate whatever direction
you can give me. I've been trying to install for two weeks now, and
I'm just ready to start coding.... :)
Michael Brubaker
Java Developer Wannabe,
Orlando, Florida
Contents of autoexec.bat:
PATH=.;..;C:\Windows\command;C:\MSWORD\OFFICE;c:\Oracle\Ora81\bin;C:\JDK1.1.8\BIN;C:\Oracle\Ora81\jdbc\lib\classes111.zip;C:\Tomcat\jakarta-tomcat\lib\servlet.jar;C:\Tomcat\jakarta-tomcat\lib\jasper.jar;%CLASSPATH%
C:\PROGRA~1\COMMON~1\NETWOR~1\VIRUSS~1\40~1.XX\scan.exe C:\
@IF ERRORLEVEL 1 PAUSE
set TOMCAT_HOME=C:\jakarta-tomcat
set JAVA_HOME=C:\jdk1.1.8
@ECHO OFF
set CLASSPATH=.;..
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\classes;
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\webserver.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\jasper.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\xml.jar
set CLASSPATH=%CLASSPATH%;%TOMCAT_HOME%\lib\servlet.jar
set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar
set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\bin
@ECHO ON
set CLASSPATH=%CLASSPATH%;C:\Oracle\Ora81\jdbc\lib\classes111.zip;C:\Oracle\Ora81\bin