I have run the servlet with url :http://localhost:8080/myApp/servlet/Testing
According to this, when you enter the URL of http://localhost:8080/myApp/servlet/Testing, Tomcat will look for a servlet-mapping with the url-pattern of /Testing - there is no such url-pattern in the web descriptor. I assume you really meant to enter http://localhost:8080/myApp/servlet/TestingServlet, for which there is a matching url-pattern.
When you enter http://localhost:8080/myApp/servlet/TestingServlet, it will find a servlet-mapping with that url-pattern, and then try to find a servlet with the servlet-name of TestingServlet. There is no such servlet - either the servlet-name in the servlet section needs to be updated, or the servlet-name in the servlet-mapping needs to be updated.
Balu Sadhasivam wrote:
Use package always to write your servlet programs. so <servlet-class> would change as com.dhanil.TestingServlet
Use web-app that suits your container. Tomcat 6 i believe would support lower versions , 2.4 and higher as well
Very good advise, however these will not solve the fundamental issues of the XML fragments being incorrect. Personally I would recommend you fix the XML and confirm that it is working, then go back to fix code style issues.