公司是做C/S应用的,分为普通java工程的前台和web工程的后台。
最近我做了一个B/S架构的应用,使用Spring+struts2+JPA,现在老大要求我将这个应用整合到以前的c/s架构的service里面,现在问题是: 我只想用struts2处理所有以Action结尾的Bean和*.jsp页面,其他都不处理。 我该如何实现啊? web.xml里面不能使用/*的,否则会处理所有请求,以前的c/s程序就用不起了
如:
web.xml:
错误1:
struts2
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
struts2
/*
这样的话C/S程序要报错的,我该如何实现呢?
错误2:
struts2
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
struts2
.action
struts2
.jsp
错误3:
struts2
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
struts2
.action,.jsp
请问还有其他实现方式么?
坐等大神回答 谢谢了
http://sswh.iteye.com/blog/756922
[url]http://zyn010101.iteye.com/blog/1340368[/url],第二种方式怎么了?
不知道第二种错在哪里? 可以试试struts.properties里面添加配置struts.action.extension=action,do 不过这样filter还是会被调用,只是action不调用了
写过过滤器filter就OK了....