这个错误主要是struts-config.xml或web.xml上配置出错
仔细对比后就可以解决
struts-config.xml
<controller
processorClass="org.springframework.web.struts.DelegatingRequestProcessor">
</controller>
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/classes/applicationContext.xml" />
</plug-in>
web.xml
<context-param>
<param-name>
contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContext.xml</param-value>
</context-param>
<servlet>
<servlet-name>context</servlet-name>
<servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
主要是要保证
contextConfigLocation名字没有错误即可。
仔细对比 要一字不差