aspose file tools*
The moose likes Servlets and the fly likes Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Tomcat" Watch "Tomcat" New topic


Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I installed Tomcat 3.1 on Win �98. I am trying to compile a Servlet with much success so far. I am getting an error message �HTTPServlet not found�, �javax not found � etc.
I set JAVA_HOME =C:JDK1.2.2 & TOMCAT_HOME=C:\TOMCAT. I also have C:\JDK1.2.2\lib\tools.jar in the Classpath.
Still I get the error messages. Besides the above what needs to be done. Any help is highly appreciated.
Thanks !
Tony Alicea

Joined: Jan 30, 2000
Posts: 3222
"JAVA_HOME =C:JDK1.2.2"...
Was that a typo? Or do you have JAVA_HOME=C:\JDK1.2.2
Of course you have the import statements in your source files...

Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi Tony,
It is jdk:\1.2.2. Yes i also have the import statments in the source. But still i get the error messages.

Srikanth Madduri

Joined: Jun 19, 2000
Posts: 10
Rao gaaru,
Try including the statement "import javax.servlet.http.*;" and try compiling the servlet. Also look into
"c:\tomcat\src\javax\servlet" directory. If the HttpServlet class is in this directory then your code would compile in the present state. Since there is a "http" sub-directory, you must incluse this in your servlet.
Try this and please tell me if I am wrong.
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944

But i am still encountering the same problem. I am trying to compile the servlet on JDK1.2.2. Do i have to copy Jar files to the JDK.
I included the Jar files in the CLASSPATH as C:\JDK1.2.2\lib\tools.jar. I set the JAVA_HOME=c:\JDK1.2.2 & TOMCAT_HOME=c:\tomcat.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12682
The servlet classes are "standard extensions" so you can
either specifically point your classpath to include the JAR
file that tomcat provides:
SET CLASSPATH=%CLASSPATH%;.;c:\tomcat\lib\servlet.jar
OR you can copy that JAR to your JDK1.2.2\jre\lib\ext
directory where the standard extensions live.

Java Resources at
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi William,
Thanks a lot. It works now ! Thanks Srikanth& Tony.
I agree. Here's the link:
subject: Tomcat
Similar Threads
trouble starting tomcat
The file or folder 'java.exe. that this shortcut refers to cannot be found
help me please
Servlet Compilation Error
application page shows blanks upgrading from Tomcat5.5 to tomcat 6