Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Class Path Problems  RSS feed

 
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have finally started my next Servlet attempt but am having troubles with the javaranch.common package. I have got it in my classpath but when I try and compile I get the following error

AddVideoServlet.java:5: cannot access javax.servlet.http.HttpServlet
file javax\servlet\http\HttpServlet.class not found
public class AddVideoServlet extends LogServlet
^
1 error


Is this because it can't find the javaranch package or is it to do with my JDK?

Thanks

Amy
 
village idiot
Posts: 1214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm.....
Are your import statements syntactically correct?
Do you have the latest version of the com.javaranch.common file?
Did your last assignment work okay?
 
Sheriff
Posts: 9099
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The javax.servlet.http.HttpServlet is not in the javaranch.common package.

Perhaps you missed the section on the assignment page that addressed this. There is a lot of info in that intro stuff. It's right after the part about running the code for c:\java\BeeServlet.java.
 
Amy Phillips
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much! I am all sorted now
 
Let's go to the waterfront with this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!