Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

i cant run my program

 
nana Amr
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all i have this program:


but when i compile it the error :


plz what should i do ???
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to get the javax.servlet libraries on to your compiler's classpath.

If you're using Tomcat, add TOMCAT_HOME/common/lib/servlet-api.jar to the classpath.
 
nana Amr
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but i have servlat lib at
C:\tomcat\jakarta-tomcat-3.2.3\lib\servlet.jar
isnt ok??
 
nana Amr
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
plz tell me how to add it in steps
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add servlet.jar to your system's CLASSPATH environment variable or use javac's -cp switch to add it.

By the way:
Why are you using such an ancient version of Tocmat?
[ October 22, 2005: Message edited by: Ben Souther ]
 
nana Amr
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so :
set TOMCAT_HOME=C:\tomcat\jakarta-tomcat-3.2.3\lib\servlet.jar
??
 
nana Amr
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
By the way:
Why are you using such an ancient version of Tocmat?

hehehehehe

i dont know, its what i have in my country
[ October 22, 2005: Message edited by: nana Amr ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See:
http://faq.javaranch.com/view?HowToSetTheClasspath

If you're not familiar with Java, I strongly recommend either getting a book on it or following some web tutorials to strengthen up on the fundamentals before tackling servlets.
You'll save yourself a lot of time and aggravation if you do;

There is no shortage of them on the web:
http://www.google.com/search?hl=en&q=JAVA+TUTORIAL&btnG=Google+Search
 
nana Amr
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK THX FOR HELP
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by nana Amr:

hehehehehe

i dont know, its what i have in my country

[ October 22, 2005: Message edited by: nana Amr ]


Are you unable to download more recent versions from:
http://tomcat.apache.org ?

The problem with starting out on Tomcat 3.3 is that most of the current books and tutorials are written for more recent versions of, the Servlet Spec, the JSP spec, and for Tomcat in general. A lot of the projects in the books and tutorials won't work with that version.
Additionally, most of the people on forums like this haven't touched 3.3 in years (if at all) and may only be able to give you advice that doesn't really apply to the version you are running.
 
nana Amr
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im try to learn servlet and jsp from a book "advanced java 2 platform" by Deitel, and the CD come with it includes j2sdk 1.3.1 and tomcat 3.2.3.
im trying to learn more but this what i have
 
nana Amr
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i dont know if the book examples work with the new tomcat version
 
nana Amr
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and thx u solv my problem
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic