Two Laptop Bag
The moose likes Servlets and the fly likes problem in calling servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "problem in calling servlet" Watch "problem in calling servlet" New topic

problem in calling servlet

gaurav chhabra
Ranch Hand

Joined: Jul 24, 2004
Posts: 109
i am new to servlet and using JSDK2.0 with SUN APPLICATION SERVER.
i want to call the servlet from HTML page , i m writing

and when i m calling by running through browser then it is
giving the error number 404.

please help me.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
The use of a URL containing /servlet/ is what is causing you trouble. Read this FAQ on the invoker servlet.
Divij Mahajan

Joined: Jul 26, 2004
Posts: 8
Hey Gaurav

Can you post the part of your web.xml that contains the servlet and servlet-mapping elements. and also the path where you have your servlet stored.

Maybe one of these is the cause.

-Divij<br />---------------------------------<br />Weinberg's Law: If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.
Navin Ramineni

Joined: Jul 28, 2004
Posts: 3
Also check if your firstservlet.class is in WEB-INF\classes directory
It is sorta covered in the JavaRanch Style Guide.
subject: problem in calling servlet
jQuery in Action, 3rd edition