当前位置:网站首页>Idea creates a servlet and accesses the 404 message

Idea creates a servlet and accesses the 404 message

2022-06-24 04:37:00 Granger_ g

Problem description : According to the information on the Internet idea and tomcat It's all configured , After starting the server, you can also connect to the specified address , But the link is not written by myself Servlet

Has been submitted to the 404 problem

Final solution :

First step :

The second step :

The third step : This step is where the problem is solved , It's in the picture below 3 The location of That name should be the same as the project name

My project name map :

Then restart the service , Input servlet Corresponding address , Successful visit ! Oh yeah , This problem has troubled me for nearly 1 God

After testing Use web.xml and The annotation method works well , Here are screenshots of two methods

Finally, I hope I can help you solve the problem .

原网站

版权声明
本文为[Granger_ g]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206232358125723.html