随笔-8  评论-8  文章-10  trackbacks-0

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

仔细对比 要一字不差


每天进步一点点

posted on 2008-10-24 15:55 应越 阅读(5886) 评论(2)  编辑  收藏

评论:
# re: Could not open ServletContext resource [/WEB-INF/action-servlet.xml]解决方案 2010-03-13 23:57 | Josh
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderServlet
</listener-class>
</listener>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>

要记住顺序,先监听,后面再写applicationContext.xml  回复  更多评论
  
# re: Could not open ServletContext resource [/WEB-INF/action-servlet.xml]解决方案 2013-07-19 23:26 | tolerance
错误,看这里

http://wenku.baidu.com/view/20a87eef551810a6f52486ae.html

Spring2.5、Struts2.1、Hibernate3.2、sitemesh、freemarker整合开发常见问题及解决方案  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航: