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 Beginning Java and the fly likes cannot compile 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 » Beginning Java
Bookmark "cannot compile servlet" Watch "cannot compile servlet" New topic

cannot compile servlet

felix thomas
Ranch Hand

Joined: Jun 10, 2001
Posts: 89
i have a windows98 machine wih jdk1.4 installed.
i have set the classpath=c:\jdk1.4\bin
and also the path = c:\jdk1.4\bin

all other simple java files compile but the servlet ones do not and show the below error
import javax.servlet.*;
C:\JavaWebServer2.0\servlets\ package javax.servlet.http does not exist
import javax.servlet.http.*;

what could be wrong ???
please help

Ken Cobbs

Joined: Jun 18, 2002
Posts: 29
You may need to do what is mentioned in the CattleDrive Servlet class, if you don't already have J2EE downloaded.
Download J2EE (Java 2 Enterprise Edition Software Development Kit) from Sun, and install it. It is a supplement to the JDK you already have installed. You need to include the j2ee.jar in your classpath.
It is sorta covered in the JavaRanch Style Guide.
subject: cannot compile servlet
Similar Threads
Problem running first servlet
help me solve 'package javax.servlet does not exist' error
How to install JAVA to my Win98?
When servlet compiles it can't find bean