• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

error in servlet compile

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
i have face a problem for runnimg servlet
java_home=C:\Program Files\Java\jdk1.5.0_15;

i have set path =C:\Program Files\Java\jdk1.5.0_15\bin;C:\Program Files\apache-tomcat-5.5.28;
set classpath=C:\Program Files\apache-tomcat-5.5.28\lib\servlet-api.jar; C:\Program Files\apache-tomcat-5.5.28\lib\jsp-ap.jar;
when i am compile first.java under C:\Program Files\apache-tomcat-5.5.28\webapps\jsppage\classes
getting error
as package javax.servlet does not exist
please help what i am wrong

thank's
satya
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

How exactly are you compiling your source code, are you doing that on the command line, or are you using an IDE?

When you set the classpath, you have to be careful with spaces in the path. Try this:

set classpath="C:\Program Files\apache-tomcat-5.5.28\lib\servlet-api.jar";"C:\Program Files\apache-tomcat-5.5.28\lib\jsp-api.jar";.

Note: Paths with spaces in them are in "quotes", and there must not be a space between the ; and the next entry in the path.
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please look at our Servlets FAQ, and also check whether you need to download anything more than the standard Jave installation.

Moving to servlets forum.
reply
    Bookmark Topic Watch Topic
  • New Topic