File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Problem With Servlet Compliling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem With Servlet Compliling" Watch "Problem With Servlet Compliling" New topic

Problem With Servlet Compliling

vinothk khannan

Joined: Oct 08, 2003
Posts: 13
I have j2sdk1.4... and i could not compile my servlet
it says htttpservlet class not found
i have apache tomcat for my web page
i have jsdk 2.0 (servlet runner)
Please help me out
Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 160
Just see have you added servlet.jar file in your classpath or not and maybe thats why when you compile it couldnt find the classes.
So just cheack again .
Do ask if you find more problem.

jasmine kaur
Marcus Howarth
Ranch Hand

Joined: Jan 04, 2002
Posts: 38

A couple of questions to help you.
which .jar file contains HttpServlet?
where would tomcat keep those .jars?
when you compile, how are you letting the compiler know where to look for all the classes you reference? (hint: classpath)
HTH - let us know how you get on, (
I'm not giving you a straight answer because I reckon it's better to understand rather than get a quick fix)


SCJP, March '02
Marcus Howarth
Ranch Hand

Joined: Jan 04, 2002
Posts: 38

Oops - Jasmine you beat me too it - and there was me trying to be clever
I agree. Here's the link:
subject: Problem With Servlet Compliling
jQuery in Action, 3rd edition