Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

i cant run my program

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all i have this program:


but when i compile it the error :


plz what should i do ???
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
plz tell me how to add it in steps
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK THX FOR HELP
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
and thx u solv my problem
 
The airline is called "Virgin"? Don't you want a plane to go all the way? This tiny ad will go all the way:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic