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

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

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

除上述以外,一定要注意web.xml存放的路径,其必须在WEB-INF目录中
---------------------
参考:

https://blog.csdn.net/lydong_/article/details/79812545
http://www.itdadao.com/articles/c15a1162290p0.html

idea工程中web.xml报错Servlet should have a mapping的更多相关文章

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

    配置springmvc时,报错,实际mapping已经写了,错误截图如下: 搜索无果,后来发现是工程的web.xml位置配置错误,因为我之前换过根目录位置. 修改方法: 打开Project Struc ...

  2. Eclispe创建maven工程缺失web.xml报web.xml is missing and <failOnMissingWebXml> is set to true的错误

    Eclispe创建maven工程缺失web.xml报web.xml is missing and <failOnMissingWebXml> is set to true的错误,一看,还缺 ...

  3. 新建maven工程时pom.xml报错

    新建maven工程时,pom.xml报错:第一行报如下错误:multiple annotations found at this line后添加org.eclipse.m2e相关的plugin配置后, ...

  4. 新建Maven工程,pom.xml报错web.xml is missing and <failOnMissingWebXml> is set to true

    错误原因: 项目中没有web.xml 解决办法: 在项目中添加web.xml 在pom.xml中添加下面的插件 <build> <plugins> <plugin> ...

  5. JavaWeb工程中web.xml基本配置

    一.理论准备 先说下我记得xml规则,必须有且只有一个根节点,大小写敏感,标签不嵌套,必须配对. web.xml是不是必须的呢?不是的,只要你不用到里面的配置信息就好了,不过在大型web工程下使用该文 ...

  6. JavaWeb工程中web.xml基本配置(转载学习)

    一.理论准备 先说下我记得xml规则,必须有且只有一个根节点,大小写敏感,标签不嵌套,必须配对. web.xml是不是必须的呢?不是的,只要你不用到里面的配置信息就好了,不过在大型web工程下使用该文 ...

  7. web.xml报错:Invalid content was found starting with element 'init-param'

    问题与分析 在web.xml中配置servlet节点时报错如下: cvc-complex-type.2.4.a: Invalid content was found starting with ele ...

  8. web工程中web.xml元素加载顺序以及配置实例

    简介 web.xml是web工程的配置文件,容器加载web工程时,会首先从WEB-INF中查询web.xml,并加载其中的配置信息,可以将web.xml认为是web工程的入口. web.xml中包含有 ...

  9. maven web项目的web.xml报错The markup in the document following the root element must be well-formed.

    maven项目里面的web.xml开头约束是这样的 <?xml version="1.0" encoding="UTF-8"?> <web-a ...

随机推荐

  1. 3.SLB 回话保持功能分析

    参考文档: 七层会话保持 配置服务器Cookie会话保持常见问题四层监听  

  2. 关于新版OPENWRT拔PPTP的619错或PPTPD无法连接问题笔记

    旧版的openwrt要安装kmod-ipt-nethelper这个包 对于新版,如3.18或4.xx内核的ROM,要安装kmod-nf-nathelper-extra这个包

  3. C# 13位时间戳转换成标准时间C#代码

    原地址:https://www.cnblogs.com/yixuehan/p/5559244.html /// <summary> /// 时间戳转换成标准时间 /// </summ ...

  4. 吴裕雄 10-MySQL插入数据

    语法以下为向MySQL数据表插入数据通用的 INSERT INTO SQL语法:INSERT INTO table_name ( field1, field2,...fieldN ) VALUES ( ...

  5. 吴裕雄 python神经网络 水果图片识别(4)

    # coding: utf-8 # In[1]:import osimport numpy as npfrom skimage import color, data, transform, io # ...

  6. Python gevent

    1\协程 import geventfrom gevent import monkeyimport requestsfrom bs4 import BeautifulSoupimport thread ...

  7. 给tbody加垂直滚动条的具体思路

    [给tbody加垂直滚动条的具体思路] 给tbody加垂直滚动条的思路就是把tbody设置成display:block,然后就对其高度设置一个固定值,overflow设置成auto即可 参考:http ...

  8. metasploit framework(五):meterpreter基本命令和python扩展

    基于内存的DLL注入式payload 注入合法的系统进程并建立stager 基于stager上传和预加载DLL进行扩展模块的注入(客户端API) 基于stager建立的socket连接建立加密的TLS ...

  9. DRDS 概述

    DRDS 概述 更新时间:2017-08-04 13:53:50     分布式关系型数据库服务(Distributed Relational Database Service , 简称 DRDS ) ...

  10. Mysql 单表操作、增删查改(基础4)

    新建一个表,往里面插入数据. #新建一个表 mysql> create table test( -> id int, -> name varchar(20) -> );Quer ...