Possible causes and solutions of 404 problems in accessing servlet pages

Today I finished a function Want to direct input in the address bar servletA class and parameters to test the servlet code
an error 404. But I tested a new servletB class and it worked exactly the same way.
I was puzzled because both classes were servlets I created directly from Eclipse, and the web.xml was configured automatically. Even if the configuration is wrong it should be both wrong. Want to for a long time, suddenly think of you just created ServletA class, put the wrong to service pack, dragged her into the servlet found directly after the bag, but the web. The XML configuration path has been in the service package
as shown in figure
and the actual class names should be com. Student. Servlet. DeleteStudentServlet
for simple reason is:
I just begin to create the servlet misplacing to service the bag (actually should put the servlet bag), but to create the eclipse will help me get web. The XML class name is automatically configured (the name of the class is the route of the distribution of com. Student. Service. DeleteStudentServlet) and I treat the servlet to tow the servlet packages, web, XML is not modified, lead to the web. The path name of the class error in the XML. So when he visited the Servlet can’t find the correct path, to be an error 404.
so the Servlet error 404, must be sure to check the path name is correct, also want to check the web, XML configuration information is incorrect.
Summary: Make sure to go to web.xml to change the configuration if the package you created the Servlet contains changes.

Read More: