• 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

HTTP Status 404

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i saved the following program inside the classes subdirectory under WEB-INF and the web.xml was saved inside the WEB-INF. I THEREAFTER tryied to RUN the servlet application by typing http://localhost:8080/myApp/servlet/TestingServlet

HERE is my program




the web.xml is as follow:




All i get for this is HTTP STATUS 404

i also typed "http://localhost:8080/testservlet" inside my browser and what i get is "HTTP Status 404 - /testservlet"

please help me out i am very new in web programming.

thanks
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It doesn't look like your deployment descriptor has any servlet mappings. Unmapped servlets cannot be invoked.
 
Ranch Hand
Posts: 40
Eclipse IDE Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
You need to put
<servlet-mapping> tags with each of your servlet in your web.xml file. Google for a sample web.xml file. Or it would be best, if you follow any of the startup tutorials available on 'jsp-servlets'.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic