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 !
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
Joined: Nov 22, 2008
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
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.