2

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.

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.

-Thanks

user204069
  • 1,215
  • 3
  • 19
  • 25

1 Answers1

2

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

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

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

You can put your jar to WebSphere\AppServer\lib\ext 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.

Community
  • 1
  • 1
Gas
  • 17,601
  • 4
  • 46
  • 93