sudhir nim wrote:web.xml being read by container has nothing to do with the URL weather it's TestService or any thing else. It will be used by container. You don't need to worry about when container reads it.
And the URL your are mentioning "http://sever-ip/TestService/" Here /TestService is called context path and you cant modify it using web.xml. I would still advice your to read basic guides on java web development, and get some ideas about things like, context path, url patterns, servlet mappings etc.
sudhir nim wrote:Servlet doesnt read web.xml, it is used by web container, web.xml doesnt go in any arbitrary directory, it must be inside WEB-INF directory. Read some basic servlet tutorials.
See for more details on web application directory structure and this servlet example
Bear Bibeault wrote:One more time: servlet mappings have NOTHING to do with directories. Nothing. Nada. Zero. Zilch.
You can map the servlet to ANY path you want, and there are no directories with the same name. None. Zero.
This maps the servlet to both ralph/* and henry/*.
And there are NO directories named ralph or henry anywhere.
Once again: servlet mappings have nothing to do with directories. Nothing.
Bear Bibeault wrote:Servlet mappings have nothing to do with directories. If you want two URLs to go to the same servlet, just add two mappings to the servlet.