cxf , struts+spring中web.xml过滤url问题解决方案

在项目中配置webservice,查找wsdl时总是提示"HTTP Status 404 - There is no Action mapped for namespace / and action name ...",原来是因为web.xml中struts过滤器StrutsPrepareAndExecuteFilter自动拦截了该url的问题。

解决方案:

在struts.xml中增加一行:

<constant name="struts.action.excludePattern" value="/CrystalReportViewerHandler,/CXFservice/.*" />

注意:value的值不是普通的url,应该用正则,比如"/CXFservice/.*",这样才有效。

value的值为多个时,用逗号隔开。

 

 

参考:

http://xingguangsixian.iteye.com/blog/2088617

http://chyx72.iteye.com/blog/1436368

posted @ 2015-07-14 17:17  binbiny  阅读(207)  评论(0编辑  收藏  举报