Adding jars for a ServletFilter
I am running 6.0.3 on linux with the default liberty.
I'd like to add some Jar files for our SSO servlet filter agent. I've tried putting them in the JTS_HOME/server/liberty/wlp/lib directory but it complains that it cannot find the filter class. I've also tried putting them in the JTS_HOME/jre/lib/ext and endorsed directories, and while it sees the servlet filter classes, it cannot find the javax.servlet.Filter class. [ERROR ] SRVE0315E: An exception occurred: java.lang.Throwable: javax.servlet.ServletException: Filter [Cams Servlet Filter Web Agent]: com.cafesoft.security.webagent.servletFilter.CamsServletFilterWebAgent was found, but is missing another required class. at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4913) at [internal classes] Caused by: javax.servlet.ServletException: Filter [Cams Servlet Filter Web Agent]: com.cafesoft.security.webagent.servletFilter.CamsServletFilterWebAgent was found, but is missing another required class. at com.ibm.ws.webcontainer.filter.WebAppFilterManager._loadFilter(WebAppFilterManager.java:639) ... 1 more Caused by: java.lang.NoClassDefFoundError: javax.servlet.Filter Do I have to add the classes to each of the apps? Or is there a better place? Or is this not possible with this version of java? |
2 answers
Maybe the approach mentioned here?
http://stackoverflow.com/questions/35379315/create-a-servlet-filter-websphere-liberty-profile Comments
Kevin Creason
commented Jan 04 '17, 6:29 p.m.
Thanks, that looks like it could be helpful but I'm missing a lot of background information. I'm trying to catch up. Would this be added into the server.xml, it has a featureManager block:
|
Two more approaches you could try.
Adding global libraries to all applications: http://www.ibm.com/support/knowledgecenter/en/SSRTLW_8.5.5/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/twlp_classloader_global_libs.html Using shared libraries: http://www.ibm.com/support/knowledgecenter/en/SSRTLW_8.5.5/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/cwlp_sharedlibrary.html Comments
Kevin Creason
commented Jan 05 '17, 1:17 p.m.
This looks very helpful!
Kevin Creason
commented Jan 05 '17, 1:51 p.m.
I received the following error trying simple setup above:
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.