Could not open ServletContext resource [/WEB-INF/xxx-servlet.xml]

造成这个问题的原因很多,网上的解决思路也很多,比如以下的:

https://blog.csdn.net/wlwlwlwl015/article/details/48134763

Stack Overflow:https://stackoverflow.com/questions/14954931/my-application-could-not-open-servletcontext-resource

……………………

但是,当你发现以上的问题都没犯时还疯狂报Could not open ServletContext resource [/WEB-INF/xxx-servlet.xml]的错是不是有点怀疑自己?

此时请检查控制台报错的xml文件和你当前项目的xml文件是不是同一个文件,比如控制台报错的是 a-servlet.xml这文件,而你当前的项目是b-servlet.xml文件,那么这就是问题的根源!

此时出错的并不是当前的项目,而是你之前包含有a-servlet.xml的那个项目!!!

可能犯这个错误的人比较少,解决办法如下!

当你Run on Server时,别直接finish,先next,将之前有错的项目移除先

Could not open ServletContext resource [/WEB-INF/xxx-servlet.xml]的更多相关文章

  1. HTTP状态 500 - 内部服务器错误之Could not open ServletContext resource [/db.properties]或者 [/mybatis.xml]

    报错原因是因为找不到db.properties或者mybatis.xml,但是我明明写了有.找了一下,才发现spring-dao.xml里面这两个配置文件地址有问题 Maven项目,applicati ...

  2. Cannot find class for bean with name '/hello' defined in ServletContext resource

    Cannot find class for bean with name '/hello' defined in ServletContext resource [/WEB-INF/chapter2- ...

  3. 【JAVA错误笔记】 - 【Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法】

    错误描述: Could not open ServletContext resource [/WEB-INF/applicationContext.xml] 原因分析: 问题主要由于加载spring的 ...

  4. Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法

    抛错: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document ...

  5. 关于SpringMVC项目报错:java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/xxxx.xml]

    关于SpringMVC项目报错:java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/xxxx ...

  6. 出错: IOException parsing XML document from ServletContext resource [/cn.mgy.conig]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/cn.mgy.conig]

    错误的详细内容: 严重: StandardWrapper.Throwable org.springframework.beans.factory.BeanDefinitionStoreExceptio ...

  7. Linux:Tomcat报错: Error creating bean with name 'mapScheduler' defined in ServletContext resource 的解决方法

    2013-12-31 14:22:28 [ERROR] [ContextLoader.java->initWebApplicationContext(220) Context initializ ...

  8. BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource

    Tomcat报错如下: BeanDefinitionStoreException: IOException parsing XML document from ServletContext resou ...

  9. Spring部署报错:Could not open ServletContext resource [/db.properties]

    在使用Spring MVC过程中,部署项目报错,报错信息如下: 八月 15, 2016 5:02:04 下午 org.apache.catalina.core.StandardContext list ...

  10. 关于“Could not open ServletContext resource [/WEB-INF/applicationContext.xml]”解决方案

    问题说明,我在web.xml文件中进行了如下配置 <servlet> <servlet-name>dispatcherServlet</servlet-name> ...

随机推荐

  1. 使用Selenium+firefox抓取网页指定firefox_profile后的问题

    from: https://blog.csdn.net/chufazhe/article/details/51145834 摘要:在使用selenium和firefox抓取网页指定firefox_pr ...

  2. centos 内存清理

    在清理前内存使用情况 free -m 用以下命令清理内存 echo 1 > /proc/sys/vm/drop_caches 清理后内存使用情况再用以下命令看看. free –m 多出很多内存了 ...

  3. Vue小案例 之 商品管理------为之前的页面修改样式

    最终修改的页面效果: 修改的css: <style> #container{ margin: auto; text-align: center; width: 1000px; border ...

  4. 4、pandas的数据筛选之isin和str.contains函数

    DataFrame列表: 以>,<,==,>=,<=来进行选择(“等于”一定是用‘==’,如果用‘=’就不是判断大小了): 使用 &(且) 和 |(或) 时每个条件都要 ...

  5. 【题解】Luogu P3203 [HNOI2010]弹飞绵羊

    原题传送门 这题用Link-Cut-Tree解决,Link-Cut-Tree详解 预处理:从一个点弹到另一个点就在lct里从\(i\)连边到\(i+k_i\),如果绵羊被弹飞了就从\(i\)连边到\( ...

  6. 免费CDN公共库——网站提速 静态资源库

    原文链接:https://blog.geekzhao.me/cdnjs.html 新浪SAE公共资源 推荐指数★★★ 支持https http://lib.sinaapp.com/js/jquery/ ...

  7. MS08_067漏洞渗透攻击实践

    MS08_067漏洞渗透攻击实践 实验前准备 1.两台虚拟机,其中一台为kali,一台为windows xp sp3(英文版). 2.在VMware中设置两台虚拟机网络为NAT模式,自动分配IP地址, ...

  8. bzoj 4044 Virus synthesis - 回文自动机 - 动态规划

    题目传送门 需要高级权限的传送门 题目大意 要求用两种操作拼出一个长度为$n$的只包含'A','T','G','C'的字符串 在当前字符串头或字符串结尾添加一个字符 将当前字符串复制,将复制的串翻转, ...

  9. 无旋转Treap简介

    无旋转Treap是一个神奇的数据结构,能够支持插入,删除,查询k大,查询某个数的排名,查询前驱后继,支持各种区间操作和持久化.基于旋转的Treap无法实现区间反转等操作,但是无旋Treap可以轻易地支 ...

  10. poj 1159 Palindrome - 动态规划

    A palindrome is a symmetrical string, that is, a string read identically from left to right as well ...