No Spring WebApplicationInitializer types detected on classpath

在activiti中配置使用mysql,加入mysql的jar包后,启动tomcat报如下错误

七月 01, 2015 3:14:49 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
七月 01, 2015 3:14:53 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'dispatcher'
七月 01, 2015 3:14:53 下午 org.apache.catalina.core.ApplicationContext log
信息: Destroying Spring FrameworkServlet 'dispatcher' 

解决方法:

在web.xml中添加下面这行

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
metadata-complete="true"
id="WebApp_ID" version="2.5">

posted @ 2015-07-01 15:43  礼拜天  阅读(2117)  评论(0编辑  收藏  举报