Error while compiling Servlet

Hello everyone,

I am quite new to the Java Technology.

I have this simple servlet program which gives me an error when I try to compile it.

The error is as follows:

TestServlet.java:1: package javax.servlet does not exist

import javax.servlet.*;

^

TestServlet.java:2: package javax.servlet.http does not exist

import javax.servlet.http.*;

^

Is this anything to do with the classpath or path settings?

Any help would be highly appreciated.

Thanks in advance,

[536 byte] By [justsmilea] at [2007-10-1 4:44:41]
# 1
You need to have the j2ee.jar or some jar having the servlet classes into the classpath.
annie79a at 2007-7-9 5:19:04 > top of Java-index,Java Essentials,New To Java...
# 2
hi,thanks for the reply,Can I download j2ee.jar from the Sun website? If yes,then what may be the approximate download time?Thanks,
justsmilea at 2007-7-9 5:19:04 > top of Java-index,Java Essentials,New To Java...
# 3
You will find all the information here http://java.sun.com/j2ee/1.4/download.html#sdk
annie79a at 2007-7-9 5:19:04 > top of Java-index,Java Essentials,New To Java...
# 4
I have this file called servlet.jar which has some .class files.And this file is in the classpath.Will that be of any help to me?Thanks,
justsmilea at 2007-7-9 5:19:04 > top of Java-index,Java Essentials,New To Java...
# 5
> I have this file called servlet.jar which has some> .class files.And this file is in the classpath.Just open it with WInZip or some ZIP viewing utility and check if the required classes are present.
annie79a at 2007-7-9 5:19:04 > top of Java-index,Java Essentials,New To Java...