Servlet Packages Not Found

I have simple servlet program. When I am trying to compile it the compiler throws error like:
import javax.servlet.HttpServlet.*; Package not found.
I also set classpath of apache tomcat and JDK like:
CATALINA_HOME = C:\Apache Software Foundation\Tomcat 6.0\bin
JAVA_HOME = C:\java\jdk1.6\lib
And also copy servlet,jar & jsp.jar file to jdk1.6 \lib directory.
But still my program is not compiling.
I am on Windows.

I have simple Hello World Servlet program. When I am trying to compile it
the Compiler throws error like:
import javax.servlet.HttpServlet.*; Package not found.
I also set classpath of apache tomcat and JDK like:
CATALINA_HOME = C:\Apache Software Foundation\Tomcat 6.0\bin
JAVA_HOME = C:\java\jdk1.6\lib
And also copy servlet,jar & jsp.jar file to jdk1.6 \lib directory.
But still my program is not Compiling.
I am on Windows.
Please reply ,

you use package import javax.servlet.HttpServlet.*; So you have to set path
=
CATALINA_HOME = C:\Apache Software Foundation\Tomcat 6.0
JAVA_HOME = C:\java\jdk1.6
and
set classpath=
C:\Apache Software Foundation\Tomcat 6.0\common\lib

set these path as system environment variable then your program will compile
successfully

Hi Deepak,
You can try all above solution but for quick and simple one just give classpath variable arguments up to your servlet-api.jay/servlet.jar file at compile time.
javac file.java -classpath "*/*/*/servlet-api.jar"

Hi Deepak,
You can try all above solution but for quick and simple one just give classpath variable arguments up to your servlet-api.jay/servlet.jar file at compile time.
javac file.java -classpath "*/*/*/servlet-api.jar"

It could be as simple as the install path for Apache Tomcat. I have read a few posts online, and also had a few problems myself, when it is install in a path with spaces.
Try uninstalling and reinstalling into something like: c:\servers\apache\tomcat_6.0.29 or whatever the particular version number might be.

JAVA_HOME should be set to "C:\java\jdk1.6"
CATALINA_HOME should be set to "C:\Apache Software Foundation\Tomcat 6.0"
but setting these variable is optional for versions above tomcat 5.5. these
are automatically set on later versions

I am using Apache Tomcat 7.0.5 and I have set all env vars as:--
CATALINA_HOME = C:\Apache Software Foundation\Tomcat 6.0
and
JAVA_HOME = C:\java\jdk1.6
and my code is working.
so try this and let me know if it works.