File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes newbie- can't compile java servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "newbie- can Watch "newbie- can New topic

newbie- can't compile java servlet

roland edwards

Joined: Jul 23, 2001
Posts: 1
I'm trying to compile my servlet and I'm getting these messages:
package javax.servlet does not exist
package javax.servlet.http does not exist
I'm using Resin-2.0.1 servlet runner.
My path statement:
The LIB directory is where all the JAR files for Resin are located. I assume the java libraries are in JAR files but I'm a newbie - who knows?
thanks for any help.
Subbu Aswathanarayan
Ranch Hand

Joined: Jun 22, 2001
Posts: 73
you need to include ur servlet.jar file in your classpath
if you are using windows, insert the following line in ur autoexec.bat
SET CLASSPATH=%CLASSPATH%;<jdk root directory>\lib\servlets.jar

for eg if you have installed jdk in c:\ then ur jdk root direcory should be C:\JDK1.3
hope this helps.

I agree. Here's the link:
subject: newbie- can't compile java servlet
It's not a secret anymore!