jdk_cn
乞丐
Banned
UID 63549
精华
0
积分 -9
帖子 122
金钱 -9 喜悦币
威望 0
人脉 0
阅读权限 1
注册 2005-3-18
状态 离线
|
resin下对struts2支持的一点补充
因为struts2的服务方式为filter方式,而Resin的mod_caucho插件正常情况下仅会对Servlet,Jsp服务,不会对Filter过滤的网址服务,这给struts2在Resin上使用带来一些问题。这可使用"Special servlet-mappings",详细情况可以参考http://www.caucho.com/resin-3.0/install/plugin-dispatch.xtp。 (Java虚拟机 jvm.cn 提供专业jsp空间服务)
也就是说,对于一些特殊的url,可以使用plugin_match来让resin来服务,而plugin_ignore的作用正好相反。
在这里,我们需要plugin_match,为了避免打乱正常的配置,我们使用和web.xml文件相同作用的resin-web.xml来设置相应的url,这样设置仅对resin有效,不影响其他server,还是不错的。
最后的resin-web.xml是这样的:
<web-app xmlns="http://caucho.com/ns/resin">
<servlet-mapping url-pattern='/struts/*' servlet-name='plugin_match'/>
<servlet-mapping url-pattern='/other/*' servlet-name='plugin_match'/>
<servlet-mapping url-pattern='*.action' servlet-name='plugin_match'/>
<servlet-mapping url-pattern='*.html' servlet-name='plugin_match'/>
<servlet-mapping url-pattern='*.do' servlet-name='plugin_match'/>
<servlet-mapping url-pattern='/dwr/*' servlet-name='plugin_match'/>
</web-app>
这样struts2的action就可以正常工作了。
|  Jvm.cn Linux系统专业Jsp空间,php空间 |
|