File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Please help, servlets are not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Please help, servlets are not working" Watch "Please help, servlets are not working" New topic

Please help, servlets are not working

Tamer Ibrahim

Joined: Sep 25, 2003
Posts: 4
I just started working with servlets today, I tried the first example at "chapter 1" at Hanumant Deshmukh's book (SCWCD Exam Study Kit), I made everything as discribed in the book, but it keeps giving me an error of "resource not found".
I use TomCat 4.1 as suggested by the book auther.
Manoj Gundawar
Ranch Hand

Joined: Nov 17, 2002
Posts: 169
Hi Tamer,
Things to be looked very carefully:

In Web.xml:
Servlet tag is correct. (class name etc)
Servlet mapping tag is given correctly.

Also make sure that servlet class is present in the correct directory under web-inf. Check the URL you are using to access the servlet.
Restart the server, after you do any corrections.
It should work. There is no magic in that, unless there is some silly error.
[ October 08, 2004: Message edited by: Manoj Gundawar ]

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
Some books still use examples that require the "invoker" servlet. If the url you are using has "/servlet/" in it, that is where your problem probably lies. Read the Ranch FAQ on the Invoker.
I agree. Here's the link:
subject: Please help, servlets are not working
jQuery in Action, 3rd edition