cxf、struts、spring中web.xml过滤url问题解决方案
2013-11-26 13:42
330 查看
利用struts2自带的正则匹配,应该说这算是最官方的解决方案了
在struts.properties中加正则匹配
struts.action.excludePattern=/webservice/.*
web.xml
Xml代码
参考:http://chyx72.iteye.com/blog/1436368
在struts.properties中加正则匹配
struts.action.excludePattern=/webservice/.*
web.xml
Xml代码
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:com/travelsky/rap/conf/applicationContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>CXFServlet</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>CXFServlet</servlet-name> <url-pattern>/webservice/*</url-pattern> </servlet-mapping> <!-- struts2 框架启动配置如下: --> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list> <welcome-file>login.jsp</welcome-file> </welcome-file-list> </web-app>
参考:http://chyx72.iteye.com/blog/1436368
相关文章推荐
- cxf , struts+spring中web.xml过滤url问题解决方案
- Spring 项目 web.xml 出错问题解决方案
- 创建Spring-Mybatis web项目,解决IDEA下找不到XXXmapper.xml文件的问题
- 在web.xml中注册IntrospectorCleanupListener监听器以解决struts等框架可能产生的内存泄露问题
- struts2.0 web.xml配置问题解决
- 关于idea创建struts2中web.xml的filter的url中struts无法解析的问题
- spring boot 用war包部署到tomcat下详细教程(解决缺少web.xml报错的问题)
- 创建web工程Spring配置文件找不到问题解决方案
- CXF WebService+Spring 无法注入问题解决方法
- 线程安全问题(解决) -------使用spring 的action-servlet.xml解决struts线程问题
- 在web.xml中注册IntrospectorCleanupListener监听器以解决struts等框架可能产生的内存泄露问题
- 在web.xml中注册IntrospectorCleanupListener监听器以解决struts等框架可能产生的内存泄露问题
- maven创建web工程Spring配置文件找不到问题解决方案
- web.xml配置 struts 提交表单乱码问题解决
- web.xml中taglib标签报错问题解决方案
- maven创建web工程Spring配置文件找不到问题解决方案
- 在web.xml中注册IntrospectorCleanupListener监听器以解决struts等框架可能产生的内存泄露问题
- web.xml中taglib标签报错问题解决方案
- maven创建web工程Spring配置文件找不到问题解决方案
- 在web.xml中注册IntrospectorCleanupListener监听器以解决struts等框架可能产生的内存泄露问题