This week's giveaway is in the Java/Jakarta EE forum. We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line! See ,But I can not find the servlet.jar file in the correspond directory c:/tomcat4/lib/, What should I do? Can you please give me some advice? Any reply is highly appreciated!
Yup, you need those classes, but they can be found in either servlet.jar or j2ee.jar Servlet.jar should already exist in TOMCAT_HOME/common/lib and you can add this to your classpath or drop servlet.jar in your JAVA_HOME/lib directory Dave.
Kathy: I had this problem too. You know what! I pulled half of my hair out to solve this problem. Please follow as bellow you will have less pain. Copy servlet.jar file from tomcat4\common\lib\[copy file servlet.jar] and paste it at jdk1.3\jre\lib\ext\[paste at here servlet.jar file]. It will solve your package javax.servlet does not exist import javax.servlet.*; By the way, Have you try tomcat sample servlet examples? Are they running? If they are you are all set, now rock and roll. Otherwise you got to set calsspath for CATALINA_HOME = tomcat4.0 . My best advise for all these go through tomcat docs. It takes time but comes out. I wish there were book like "Tomcat Installation for Dummies", I would have been first guy to reserve first copy of their first publication. It was lot pain. I do not want to see other people marching this route. If you need more information keep posting. GOOD LUCK. BK
Hi, HelloWorld.java:4: package javax.servlet does not exist import javax.servlet.*;
posted 16 years ago
Thanks Dave and BK! BK, I did run the sample servlet, they did not run either. You mean I need to add: set classpath=c:\tomcat4; ? If there were a book "Tomcat Installation for Dummies", I will do the same thing as you. But right now, I will follow your advice and keep reading the tomcatdocs. Thanks again.
SET JAVA_HOME=C:\JDK1.3 SET CATALINA_HOME=C:\TOMCAT4.0 SET PATH=%JAVA_HOME%\BIN;%CATALINA_HOME%\BIN; SET CLASSPATH=%CLASSPATH%;C:\mydir\servlet.jar; Startup.bat Now check as: localhost:8080 Tomcat's index page must be there.. Write me back if any problem.