File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Not able to compile first servlet 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 » Beginning Java
Bookmark "Not able to compile first servlet" Watch "Not able to compile first servlet" New topic

Not able to compile first servlet

Shaan patil
Ranch Hand

Joined: Dec 22, 2007
Posts: 58
Hi , I am not able to compile my first servlet. What is the path setting to compile the servlets ? package javax.servlet.http does not exist

[ January 23, 2008: Message edited by: Bear Bibeault ]

"You cannot change the truth but truth can change you "
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

The important thing to remember is that a servlet class is no different than any other class with dependencies.

This link explains the servlet specific stuff.

I'm going to move this to our Java In General (Beginner) forum where classpath, and javac issues are discussed.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46412
You have downloaded J2EE? The package you mention isn't in the standard edition, so you will have to install the enterprise edition (see the FAQ quoted earlier).
I agree. Here's the link:
subject: Not able to compile first servlet
It's not a secret anymore!