• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Running a servlet on Tomcat using Eclipse

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


should be something like:

 
Live ordinary life in an extraordinary way. Details embedded in this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic