问题描述
在J2EE应用程序中,如何创建可以访问该应用服务器上安装的其他Web应用程序的全局过滤器?
In a J2EE application, how do I create a global Filter that can access other webapps installed on that app server?
推荐答案
如果有人仍然感兴趣,以下是我对此问题的调查结果:
In case anyone is still interested, here are my findings regarding this question:
-
对于tomcat和其他来自它的webapp服务器(例如:JBoss),您可以将过滤器添加到globalweb.xml,通常位于$ TOMCAT_HOME / conf / web.xml下。
For tomcat and others webapp servers derived from it (eg: JBoss), you can add your filter to the "global" web.xml, usually located under $TOMCAT_HOME/conf/web.xml.
对于Websphere,我发现以下文章很有用:。在这种情况下,基本的想法是你编写一个ServletContext Listener并使用它来将你的过滤器附加到应用程序
For Websphere, I´ve found the following article to be useful: http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/WP101859 . In this case, the basic idea is that you write a ServletContext Listener and uses it to attach your filter to the app
这篇关于所有Web应用程序的全局筛选的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!