Could not open ServletContext resource [/WEB-INF/action-servlet.xml]解决方案

Could not open ServletContext resource [/WEB-INF/action-servlet.xml]解决方案

这个错误主要是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>

仔细对比 要一字不差

每天进步一点点

你可能感兴趣的:(Could not open ServletContext resource [/WEB-INF/action-servlet.xml]解决方案)