• 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

Unable to retrieve configuration information from the application web.xml file

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I was trying to obtain configuration information from the application web.xml file
The steps I followed as follows:-
created directory structure under C: in tomcat folder as-
webapps->dinesh1-WEB-INF->classes
web.xml This file is kept in my WEB-INF Folder)

The ConfigDemoServlet.java –(This is kept in classes folder under WEB-INF and has been compiled as well)


Server Started Successfully

Local host is running fine

But when I provide the url:

http://localhost:8080/dinesh1/ConfigDemoServlet

It shows 404 error

Where I went wrong ? May help me please.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You went wrong with this common error:



ALL classes used in servlets MUST be in packages and the class file in the corresponding directory. You got 404 because the container could not find the class file and the servlet never started. The full class name with package must appear in the servlet-class tag.



Bill
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
code seems to be fine. where you kept this class file . this should be under WEB-INF/classes and also map this servlet to some url pattern in web.xml

hope this will help you
 
reply
    Bookmark Topic Watch Topic
  • New Topic