File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ayman Jaffar
Ranch Hand
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 57
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic