jQuery in Action, 2nd edition*
The moose likes Servlets and the fly likes problem in running servlet programs 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 » Servlets
Bookmark "problem in running servlet programs" Watch "problem in running servlet programs" New topic

problem in running servlet programs

nishadinesh gupta

Joined: Apr 05, 2006
Posts: 4
i had problem in running my servlet programs. after starting the javawebserver and compiled the myservlet.java file and saved it to javawebserver2.0/servlets, i typed in browser
but it was giving me "Not Found (404) error"

The same program is running on my friends PC.

Please suggest me some remedie to this its quite urgent.

Eduardo Dela Rosa

Joined: Apr 15, 2004
Posts: 25

Make sure that your servlet has mapping in your deployment descriptor (web.xml) as in:

<servlet-name>My Servlet</servlet-name>

<servlet-name>My Servlet</servlet-name>

With this mapping, you can invoke your servlet as:



Eduardo dela Rosa<br />SCJP 1.4
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 61092


Why are you using something so antiquated?

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
It is sorta covered in the JavaRanch Style Guide.
subject: problem in running servlet programs