aspose file tools*
The moose likes Servlets and the fly likes Unable to retrieve configuration information from the application web.xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Unable to retrieve configuration information from the application web.xml file" Watch "Unable to retrieve configuration information from the application web.xml file" New topic
Author

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

Jdinesh Tiwari
Ranch Hand

Joined: Jan 13, 2013
Posts: 35
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.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
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
mohammed R farook
Greenhorn

Joined: Feb 27, 2013
Posts: 13
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Unable to retrieve configuration information from the application web.xml file