File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes won't compile....why? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark " won Watch " won New topic
Author won't compile....why?

Ayman Jaffar
Ranch Hand

Joined: Sep 06, 2000
Posts: 57
I ran the tomcat and also executed the Servlet and JSP examples succesfully
But I can't compile my class which uses servlet technology.
My OS is 2000 server.
but I get compile errors telling me packages of javax.servlet not recognized and etc... . Am I missing out on something. :roll:

1- I'm using tomcat 1.4.0 and My OS is 2000 server
2- I put the file in "C:\jakarta-tomcat-4.0.4\webapps\ROOT\WEB-INF\classes\"
3- I've set the classpath as ".;C:\jakarta-tomcat-4.0.4\common\lib\servlet.jar"

Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
try copying or moving the servlet.jar file to this directory:
ofcourse your hard drive/jdk may be different.
Ayman Jaffar
Ranch Hand

Joined: Sep 06, 2000
Posts: 57
if I set the classpath variable and restart my machine it works, so I don't have change the location of the servlet.jar file.
But thanks, becuase without this advice I wouldn't have thought of restarting the computer.

[ June 24, 2002: Message edited by: Ayman Jaffar ]
I agree. Here's the link:
subject: won't compile....why?
It's not a secret anymore!