• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in calling servlet

 
gaurav chhabra
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sir
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
http:\\localhost:8080\servlet\firstservlet

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
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The use of a URL containing /servlet/ is what is causing you trouble. Read this FAQ on the invoker servlet.
Bill
 
Divij Mahajan
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Navin Ramineni
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also check if your firstservlet.class is in WEB-INF\classes directory
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic