File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes HelloWorld.java won't compile....why? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HelloWorld.java won Watch "HelloWorld.java won New topic
Author

HelloWorld.java won't compile....why?

Ayman Jaffar
Ranch Hand

Joined: Sep 06, 2000
Posts: 57
Hi,
I ran the tomcat and also executed the Servlet and JSP examples succesfully
But I can't compile my HelloWorld.java 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"
thanks.


america
Roy Ben Ami
Ranch Hand

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

Joined: Sep 06, 2000
Posts: 57
okay,
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: http://aspose.com/file-tools
 
subject: HelloWorld.java won't compile....why?