Hello, I'm having trouble compiling my servlet. I did set classpath pointing to servlet.jar and j2ee.jar like set CLASSPATH=%CLASSPATH%;F:\Applications\Tomcat4.1\common\lib\servlet.jar;F:\Applications\Tomcat4.1\common\lib\j2ee.jar But still i'm getting errors package javax.servlet does not exist package javax.servlet.http does not exist import javax.servlet.http.*; .... Just wondering what am I missing? Thanks -PC
It all depends on how you are compiling your code. If you are using an IDE (JBuilder, NetBeans), you will have to configure the project's classpath. If you are using ant, you will have to configure a classpath for ant. Also, if you have any typos in your CLASSPATH definition, there may be problems finding the files in directories listed after the error.
set CLASSPATH=%CLASSPATH%;F:\Applications\Tomcat4.1\common\lib\servlet.jar;F:\Applications\Tomcat4.1\common\lib\j2ee.jar set CLASSPATH =.;F:\Applications\Tomcat4.1\common\lib\servlet.jar;F:\Applications\Tomcat4.1\common\lib\j2ee.jar; %CLASSPATH%;
simplest way create a new dir c:\lib copy servlet.jar and j2ee.jar in this directory. open command prompt and type. SET CLASSPATH=%CLASSPATH%;.;c:\lib\servlet.jar;c:\lib\j2ee.jar Now try to compile. Later set the values in environmental variables. [ February 10, 2004: Message edited by: bharat nagpal ]
I want my playground back. Here, I'll give you this tiny ad for it:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop