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:
- Problems of accessing servlet display 404 on MyEclipse
- 404 error in browser accessing Servlet
- Exception of browser accessing servlet404
- Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request p
- An error was reported when springboot connected to redis Servlet.service () for servlet [dispatcherServlet] in context with path [] threw e
- Error 500: javax.servlet.ServletException : srve0207e: Solutions
- Problems and solutions of installing Ubuntu 12.04 in win7
- Problems and solutions in using Linux
- Problems and solutions in learning opengl
- Solutions to network connection problems in Ubuntu 16.04.3
- Problems and solutions of error reporting in using swiper in Vue
- The spring boot set appears in the stand-alone version of redis Servlet.service () for servlet [dispatcherServlet] in context with path [] thr
- Some problems and solutions in learning opengl in vs2017
- Write about the problems and solutions when configuring OpenGL in vs2015
- Solutions to some problems encountered in programming with vs2017
- The solution to the problem that the method of interacting with database in the servlet class is invalid after the servlet submits 404, 500 refresh and becomes 404, and after connecting to the data pool
- Solutions to problems in SAS 9.3 x64 importing and exporting Excel
- Problems in compiling VTK with cmake: solutions to error configuration process, project files may be invalid
- Android learning notes 03: some problems and solutions in the learning process
- Eclipse package explorer related problems and Solutions