Hi, I'm beginning to study servlets and all those stuff... I have my jdk131 installed, and my tomcat up and running... However, when I try to compile my first servlets using javac, it does not see where the servlet libraries are. After some searching and head-scratching, I found a servlet.jar in one of Tomcat's subdirectory. I know this is related, but I couldn't figure out what to do... I have been changing a lot like changing the CLASSPATH, PATH, etc.; but nothing seems to do the trick. How do I make this work? Thanks a lot in advance!!! [ July 02, 2002: Message edited by: Charles Cayman ]
Just put the servlet.jar in your global CLASSPATH If you are using windows 98/ME - you should add e.g. C:\tomcat\lib\servlet.jar to the CLASSPATH in autoexec.bat, and restarted your PC? If using windows NT/2000/XP - then you should add e.g. C:\tomcat\lib\servlet.jar to the CLASSPATH in your 'Environment Variables'. You should now be able to type javac SomeServlet.java without any errors. Sometimes it is a god idea to add a .(dot) to the CLASSPATH as well. /Rene
Hi, thanks for the reply. I'm using Windows 2000 Pro. I went to the System Properties and looked at the Environment Variables, but only to find out that I don't have the privileges to edit them. I tried editing the CLASSPATH using a batch file. The CLASSPATH contains the new path, but it still does not work... Maybe, I need to edit the one in the System properties? I'll try to ask our administrator later or tomorrow to edit the environment variables... Thanks!