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
Author

Tomcat

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi,
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
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
"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
Anonymous
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.

Thanks.
Srikanth Madduri
Greenhorn

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.
regards
Srikanth
Anonymous
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.
Thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
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.
Anonymous
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: http://aspose.com/file-tools
 
subject: Tomcat