filter.init in pax-web-extender-whiteboard 7.2.4 does not populate FilterConfig object

13 views
Skip to first unread message

Nhut Thai Le

unread,
Jul 30, 2019, 4:06:25 PM7/30/19
to OPS4J
Hello,

I'm using pax-web-extender-whiteboard 7.2.4 and my servlet filter is annotated as below:
@Component(
service = Filter.class,
scope = ServiceScope.PROTOTYPE,
property = {
"osgi.http.whiteboard.filter.pattern=" + PathConstants.ROOT_PATH  + "*",
"osgi.http.whiteboard.context.select=(osgi.http.whiteboard.context.name=WebviewerServletContextHelper)",
"osgi.http.whiteboard.filter.asyncSupported=true",
Constants.SERVICE_RANKING + ":Integer=1",
HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_INIT_PARAM_PREFIX + "excludedUrls=" + PathConstants.ZKCOMET_PATH
}
)
public final class AuthenticationFilterForWebViewer implements Filter {

   public void init(FilterConfig filterConfig) throws ServletException {
String excludePattern = filterConfig.getInitParameter("excludedUrls"); //$NON-NLS-1$
                .....
}
}

But in the init method, i got null when using filterConfig.getInitParameter("excludedUrls"). But if i use filterConfig.getInitParameter(HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_INIT_PARAM_PREFIX + "excludedUrls") then i got the value. Is this a known bug since my understand from http whoteboard R6 is that i can get the value from FilterConfig without the filter.init prefix ?

Thai

Grzegorz Grzybek

unread,
Jul 31, 2019, 12:44:54 AM7/31/19
to op...@googlegroups.com
Hello

This could be a bug.
There are two more issues related to incorrect implementation of R6 Whiteboard:

Please create PAXWEB issue for this.

I'm going to switch to PAXWEB soon (after finishing my refactoring/polishing/cleaning work at PAXLOGGING) and review R6 (and R7) compliance.

regards
Grzegorz Grzybek

--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/7437580c-041a-4fa8-ba18-39836f4d3c30%40googlegroups.com.

Jean-Baptiste Onofré

unread,
Jul 31, 2019, 12:51:06 AM7/31/19
to op...@googlegroups.com

Hi,

I'm already working on Pax Web currently (starting R7 support), I will take a look on this one as well.

Regards
JB

Nhut Thai Le

unread,
Jul 31, 2019, 11:07:38 AM7/31/19
to OPS4J
Hi guys,


Thank you for looking into this

Thai
To unsubscribe from this group and stop receiving emails from it, send an email to op...@googlegroups.com.
--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to op...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages