This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "Help" Watch "Help" New topic


Chris Goh

Joined: Aug 23, 2001
Posts: 23 package javax.servlet does not exist
import javax.servlet.*; package javax.servlet.http does not exist
import javax.servlet.http.*;
can anyone tell me what is wrong with it?
Malhar Barai
Ranch Hand

Joined: Aug 17, 2001
Posts: 399
hv u set the CLASSPATH to where yr "javax" package exists...
check it...might help..
else get back ASAP...
good luck

Malhar Barai
SOA & Java Book
Chris Goh

Joined: Aug 23, 2001
Posts: 23
erm... where would the classpath be normally pointed?
is it somewhere in the tomcat folders?
Axel Janssen
Ranch Hand

Joined: Jan 08, 2001
Posts: 2164
Hi Chris,
servlet.jar is in:
%Tomcat%\lib (Tomcat 3.2)
%Tomcat%\common\lib (Tomcat 4.0)
In Windows you change your Classpath variable simple with:
Set Classpath=%Classpath%;C:\tomcat\lib\servlet.jar;.
(in my case using the Tomcat3.2 which is in C:\tomcat)
You may check your class variable by typing set in the Dos-Console.
Chris Goh

Joined: Aug 23, 2001
Posts: 23
I can compile my servlets!!!
I agree. Here's the link:
subject: Help
It's not a secret anymore!