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

笛里谁知壮士心,沙头空照征人骨。这篇文章主要讲述idea中web.xml报错 Servlet should have a mapping相关的知识,希望能为你提供帮助。
配置springmvc时,报错,实际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

文章图片

ps:打开Project Structure的方法: 
1、在单机工程名,按F4 
2、Ctrl+Shift+a,输入Project Structure进行搜索
 
【idea中web.xml报错 Servlet should have a mapping】转载:http://www.itdadao.com/articles/c15a1162290p0.html





    推荐阅读