This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Not able to compile first servlet" Watch "Not able to compile first servlet" New topic
Author

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 ?

ProcServlet.java:1: package javax.servlet.http does not exist

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

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

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.
http://faq.javaranch.com/java/CompilingServlets

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
Sheriff

Joined: Oct 13, 2005
Posts: 38472
    
  23
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).
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Not able to compile first servlet