在 websphere 8.5 中配置全局过滤器 [英] Configuring global filter in websphere 8.5

查看:37
本文介绍了在 websphere 8.5 中配置全局过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为 websphere 中的所有 web 应用程序注册过滤器类;通常在 tomcat 中,我在/conf/web.xml 中指定过滤器.我怎样才能在 Websphere 8.5 中做到这一点.

I want to register filter class for all web application in websphere; Tipically in tomcat I specify filter in /conf/web.xml. How can I do this in Websphere 8.5.

还有什么是 websphere 中的公共库(lib 文件夹).过滤器类在 jar 文件中,我想将该 jar 文件放在 websphere server lib 目录中.

Also what is the common library (lib folder) in websphere. The filter class is in jar file and I want to put that jar file in websphere server lib directory.

-谢谢

推荐答案

不幸的是,在 WebSphere 中没有简单的方法可以做到这一点.这里已经讨论过了 - 所有 Web 应用程序的全局过滤器

Unfortunately there is no easy way to do it in WebSphere. It was already discussed here - Global Filter for all Web Applications

WebSphere 解决方案涉及创建自定义侦听器和以编程方式附加过滤器.您可以在此处找到示例解决方案和描述 - 将 servlet 过滤器添加到所有网络应用程序

WebSphere solution involves creating custom listener and programmaticaly attach filters. You can find sample solution and description here - Adding a servlet filter to all web applications

Websphere 中的公共库(lib 文件夹)是什么?

What is the common library (lib folder) in Websphere?

您可以将您的 jar 放到 WebSphereAppServerlibext 目录以供所有配置文件、服务器和应用程序共享,或者通过 Web 控制台创建共享库 Environment >共享库并将其附加到特定的服务器或应用程序.

You can put your jar to WebSphereAppServerlibext directory to be shared by all profiles, servers and apps, or create a shared library via web console Environment > Shared libraries and attach it to the specific server or application.

这篇关于在 websphere 8.5 中配置全局过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆