spring mvc 启动时报错Could not open ServletContext resource [/WEB-INF/appServlet-servlet.xml]
来源:互联网 发布:关系数据库中的表 编辑:程序博客网 时间:2024/05/20 14:18
spring mvc 启动时报错
Could not open ServletContext resource [/WEB-INF/appServlet-servlet.xml
全局搜索也没有找到appServlet-servlet.xml相关的文件
原因是springMVC启动时,在web.xml中如果未指定servlet.xml目标文件,
则自动搜索[servlet-name]-servlet.xml文件,没有此名称的servlet.xml文件,所以报错了。
指定文件方法:通过<init-param>
附完整web.xml文件
<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"><display-name>Spring MVC Application</display-name> <servlet><servlet-name>appServlet</servlet-name><servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring/servlet-context.xml</param-value> </init-param> <load-on-startup>1</load-on-startup></servlet><servlet-mapping><servlet-name>appServlet</servlet-name><url-pattern>/</url-pattern></servlet-mapping></web-app>
0 0
- spring mvc 启动时报错Could not open ServletContext resource [/WEB-INF/appServlet-servlet.xml]
- Could not open ServletContext resource [/WEB-INF/spring-servlet.xml]
- spring 在启动服务器的时候报错 Could not open ServletContext resource [/WEB-INF/dispather-servlet.xml]
- spring 在启动服务器的时候报错 Could not open ServletContext resource [/WEB-INF/dispather-servlet.xml]
- Could not open ServletContext resource [/WEB-INF/dispatcherservlet-servlet.xml]
- Could not open ServletContext resource [/WEB-INF/springmvc-servlet.xml]
- Could not open ServletContext resource [/WEB-INF/Dispatcher-servlet.xml]
- Could not open ServletContext resource [/WEB-INF/dispatcherservlet-servlet.xml]
- Could not open ServletContext resource [/WEB-INF/springmvc-servlet.xml]
- xybb__神秘的Could not open ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml]
- Could not open ServletContext resource [/WEB-INF/spring-servlet.xml]导致可能原因
- spring异常:FileNotFoundException: Could not open ServletContext resource [/WEB-INF/XX-servlet.xml
- springmvc/mybaits的web.xml配置:Could not open ServletContext resource [/WEB-INF/springmvc-servlet.xml]
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决方法
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- dorado7 Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
- Could not open ServletContext resource [/WEB-INF/applicationContext.xml]解决
- php获取当前时间戳方法
- Sql Server字符串分割转换为表和字符串连接
- 一个web服务器的实现
- win7/64位下python2.7、easy_install安装经验
- 一个web服务器的实现(上)
- spring mvc 启动时报错Could not open ServletContext resource [/WEB-INF/appServlet-servlet.xml]
- Cocos2dx 3.0 -- 有freeType做靠山的Label
- 黑马程序员_Java概述
- eclipse for j2ee的jsp编译文件存放位置
- CPU的哈佛结构和冯诺依曼结构
- 一个web服务器的实现(下)
- 关键(一): android不同机型的适配的解决方案之按比例伸缩篇
- 随机模拟的基本思想和常用采样方法(sampling)
- android