Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running a servlet on Tomcat using Eclipse

 
Raef Kandeel
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys! how is life. I was using Tomcat and Eclipse to run a servlet. Tomcat gave me the following error in response to this url: http://localhost:8080/FirstServlet/servlet/hall.SomeServlet:-

HTTP Status 404 - /FirstServlet/servlet/hall.SomeServlet

--------------------------------------------------------------------------------

type Status report

message /FirstServlet/servlet/hall.SomeServlet

description The requested resource (/FirstServlet/servlet/hall.SomeServlet) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.14


I typed the url: http://localhost:8080/FirstServlet/servlet/hall.SomeServlet and it gave me the above error.

The three files that I had are:

ServerUtilities.java
---------------------


SomeServlet.java


And my web.xml:-



Do you know what the problem might be. Thanks Ranchers.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I typed the url: http://localhost:8080/FirstServlet/servlet/hall.SomeServlet and it gave me the above error.



Take out the "servlet/" part of your url.
It isn't in your mapping so it shouldn't be in your URL.
 
John Lu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


should be something like:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic