加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

Could not open ServletContext resource...

(2009-03-06 19:50:32)
标签:

杂谈

分类: J2EE

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>

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有