搭建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. 【359】scikit learn 官方帮助文档

    官方网站链接 sklearn.neighbors.KNeighborsClassifier sklearn.tree.DecisionTreeClassifier sklearn.naive_baye ...

  2. JAVAWEB 一一ibatis(框架)

    ,升级版是mybatis,在配置文件里写sql语句对字段进行CURD) jar包 sqlMapConfig <?xml version="1.0" encoding=&quo ...

  3. spring boot 集成Thymeleaf

                                           

  4. eclipse git 冲突管理

  5. python闭包的代码

  6. DataTable--数据生成datatable

    将数据库查出的数据生成datatable 我们一般将数据库查询出的数据用实体接受在泛型集合,然后遍历集合,以将数据绑定到前台展示,在很多情况下,泛型集合不如datatable更方便将数据操作,这里简单 ...

  7. webstocket 聊天

    /** * 初始化socket **/ function initSocket(index_host){//端口号 if( !window.WebSocket ){ console.log(" ...

  8. MVC002之获取当前用户失败(Context.User.Identity.Name)

    通过Context.User.Identity.Name想获取当前用户的域帐号信息(如:Greatwall\Snow) 可值等于"",什么原因呢. 该问题和MVC关系不大,主要是I ...

  9. ss源码学习--工作流程

    ss的local端和server端的工作流程相似,因此复用了TCPRelay类和TCPRelayHandler类. 两端均是使用TCPRelay类监听连接,并使用TCPRelayHandler类处理请 ...

  10. 【scrapy】其他问题2

    今天爬取豆瓣电影的是时候,出现了两个问题: 1.数据无法爬取并输出Retrying <GET https://movie.douban.com/robots.txt> 看起来像是被拦截了. ...