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 Plz clear my doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Plz clear my doubt" Watch "Plz clear my doubt" New topic

Plz clear my doubt

Uma Vinodh

Joined: Apr 26, 2006
Posts: 28
Hi all,

I am new to servlets.I am not able to compile and run it.
I downloaded Tomcat4.1
I want to know the requirements to compile and run servlet.

can anybody please help me.

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33107

Is servlet-api.jar in your classpath when you compile?

For an incredibly detailed tutorial, see the one at core servlets

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

With Tomcat 4, the jar file is named servlet.jar.

[Asking smart questions] [About Bear] [Books by Bear]
Ben Souther

Joined: Dec 11, 2004
Posts: 13410


Moving to Java In General (Beginner) where all javac and classpath issues go.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852


"Plz" is not a real word. Please be sure to use only real words such as "please" when posting to the JavaRanch.

And here are a few more tips to help you get the most out of JavaRanch as a resource:

1) Please modify your display name to be mixed case. The all-uppercase name is rather jarring and could be considered rude (shouting) by some. Our eyes will thank you.

2) Using a descriptive title helps direct the attention of those familiar with the area of your issue. "Plz clear my doubt" tells us nothing about the nature of your question. Please read this for more information.

3) Aside from telling us that you are having trouble compiling, your post is very light on details. It'd be more effective to include information such as how and what you've tried already. Please include more detail in your posts so that others know how to help you better.
I agree. Here's the link:
subject: Plz clear my doubt
It's not a secret anymore!