I understand that the servlet API needs to be added to JDK so that I can compile servlets. I got a file called servlets.jar which i believe is the file i need. Where do I place it or how do I set the classpath? Currently I get 100 errors when I try to compile a servlet. Please help fellow ranchers!
In a time of drastic change it is the learners who inherit the future. The learned usually find themselves equipped to live in a world that no longer exists.<br />Eric Hoffer
Placing a jar in a directory in your CLASSPATH doesn't add it to your CLASSPATH. CLASSPATH is and envirorment variable which points to jar files and class directories. You need to add the full pathname (including the ".jar" suffix) of your servlet jar to the classpath: SET CLASSPATH=%CLASSPATH%;C:\jdk1.2.2\jre\lib\ext\servlet.jar
An IDE is no substitute for an Intelligent Developer.
Joined: Aug 27, 2001
Thanks for your help ranchers. Now the new problem: I don't know which file to edit in order to set my classpath. Could anybody please tell me how to set it in Windows 98 and Windows 2K. Thanks a lot in advance!!
Jar files in the standard extensions directory are automatically located by the JVM before the classpath is searched. See the file named findingclasses.html in the tooldocs directory of your SDK installation. Therefore putting servlet.jar in that directory is sufficient. The Tooldocs directory is where you will find advice on how to set up your classpath on various operating systems. Start at the tools.html file. Bill