idea中web.xml报错 Servlet should have a mapping
配置springmvc时,报错,实际mapping已经写了,错误截图如下:

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

ps:打开Project Structure的方法:
1、在单机工程名,按F4
2、Ctrl+Shift+a,输入Project Structure进行搜索
idea中web.xml报错 Servlet should have a mapping的更多相关文章
- idea工程中web.xml报错Servlet should have a mapping
搭建ssm工程过程中web.xml报错:Servlet should have a mapping ....但是mapping已经配置好了...如下图: 搜索无果,后来发现是工程的web.xml位置配 ...
- 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 ...
- 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 ...
- Ecliplse 重命名后web.xml 报错Attribute "xmlns" was already specified for element "web-app".
报错信息:Attribute "xmlns" was already specified for element "web-app" 由于项目的重命名,出现 ...
- Springboot项目中Pom.xml报错
摘要:使用idea,两次在maven上浪费时间,第一次不知道怎么就解决了,第二次记录一下解决办法 参考博客地址: https://blog.csdn.net/u013129944/article/de ...
- web.xml报错
The content of element type "web-app" must match "(icon?,display-name?,description?,d ...
- weblogic的web.xml报错----Malformed UTF-8 char -- is an XML encoding declaration missing
weblogic报错: Malformed UTF-8 char -- is an XML encoding declaration missing 把编码修改成utf8,上传到weblogic就报这 ...
- Idea 添加完项目以后自动生成的web.xml报错 'org.springframework.web.servlet.DispatcherServlet' is not assignable to 'javax.servlet.Servlet
解决方法:Project Structure - Modules - 你的项目 - Dependencies 添加Tomcat library
- web.xml报错:cvc-complex-type.2.4.a: Invalid content was found starting with element 'async-supported'. One of '{"http://java.sun.com/xml/ns/javaee":init-param}' is expected.
在写xml的时候又一次总是报cvc-complex-type.2.4.a: Invalid content was found starting with element 错误,还出现小红叉,在网上找 ...
随机推荐
- 个人作业代码GitHub提交步骤
代码提交地址: https://github.com/eudaem/homework1 步骤: 1)用个人账号登陆GitHub,并访问代码提交地址页面,点击页面右上角的“Fork”按钮,拷贝homew ...
- Java对象和XML转换
有时候,我们需要把Java对象转换成XML文件.这时可以用JAXB来实现.(JDK1.6及以后的版本无需导入依赖包,因为已经包含在JDK里了) 假如某个公司有许多部门,每个部门有许多职员,我们可以这样 ...
- EBS-BG&LE&OU
SELECT DISTINCT hrl.country, hroutl_bg.NAME bg, hroutl_bg.o ...
- 使用python读写excel
项目中要在excel要跨工作簿根据一列数据获取另一列的数据,而excel本身的函数vlookup一直不太好用,只能用程序进行处理了,最近刚接触了python,灵机一动使用Python进行处理,先将js ...
- 如何在CentOS 7中禁用IPv6
最近,我的一位朋友问我该如何禁用IPv6.在搜索了一番之后,我找到了下面的方案.下面就是在我的CentOS 7 迷你服务器关闭IPv6的方法. 你可以用两个方法做到这个. 方法 1 编辑文件/etc/ ...
- Apache commons StringUtils 在运行时出现NoClassDefError错误的解决方法
Apache commons StringUtils 在运行时出现NoClassDefError错误的解决方法 在用tomcat运行WEB项目,并且使用了StringUtils包的时候,会出现 jav ...
- char、varchar、nchar、nvarchar、text的区别
char.varchar.nchar.nvarchar.text的区别 1.有var前缀的,表示是实际存储空间是变长的,varchar,nvarchar 所谓定长就是长度固定的,当输入的数据长度没有达 ...
- Let it crash philosophy for distributed systems
This past weekend I read Joe Armstrong’s paper on the history of Erlang. Now, HOPL papers in general ...
- JAVA异常的最佳工程学实践探索
此文已由作者占金武授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. 先说明一下背景: 项目日志中的Exception会被哨兵统一监控并报警 比较多的项目基于dubbo在做服务化 ...
- Android学习之Adapter(数据适配器)
1.定义 数据适配器是AdapterView视图(如ListView - 列表视图控件.Gallery - 缩略图浏览器控件.GridView - 网格控件.Spinner - 下拉列表控件. ...