File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat

 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3226
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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...
 
Anonymous
Ranch Hand
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 13044
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
Hi William,
Thanks a lot. It works now ! Thanks Srikanth& Tony.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic