原文链接:https://blog.csdn.net/lydong_/article/details/79812545

搭建ssm工程过程中web.xml报错:Servlet should have a mapping ....但是mapping已经配置好了...如下图:

idea工程中web.xml报错Servlet should have a mapping

搜索无果,后来发现是工程的web.xml位置配置错误,因为我之前换过根目录位置。 
修改方法: 
打开Project Structure界面,Modules>Web>Deployment descriptor,修改正确的位置即可,如下图:

idea工程中web.xml报错Servlet should have a mapping

另:打开Project Structure的方法: 
Ctrl+Alt+Shift+S

相关文章: