This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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
Similar Threads
Issues Compiling With Javac
Compile problem not finding package javax.servlet.http
package apache.commons not exists
problem with sending email/jsp
Servlet does not compile, again!