Skip to main content



      Home
Home » Eclipse Projects » Equinox » [HttpService] Filter registration behavior change in 2019-03
[HttpService] Filter registration behavior change in 2019-03 [message #1804673] Fri, 29 March 2019 15:05 Go to next message
Eclipse UserFriend
Hello,
I have an application with a RAP workbench ui
I was able to register some http filters to perform some processing before reaching my RAP entry point.

Since 2019-03 my filters are not called anymore.
The RAP workbench entrypoint is defined as an extension point. My filter is registerd programmatically using org.eclipse.equinox.http.servlet.ExtendedHttpService.registerFilter(String, Filter, Dictionary<String, String>, HttpContext) and I pass null as HttpContext

Maybe there were some changes in the httpcontext.

Is there any way to register a filter using whiteboard pattern that could apply to every context (I mean Servlet Registered through equinox extension point or a RAP entry point) ?


Re: [HttpService] Filter registration behavior change in 2019-03 [message #1804685 is a reply to message #1804673] Fri, 29 March 2019 15:50 Go to previous messageGo to next message
Eclipse UserFriend
I did some additional tests it seems it is necessary now to give same httpcontextid when registering servlets and filters using equinox extension points org.eclipse.equinox.http.registry.filters and servlets
Leaving httpcontextid empty (default context) a filter registerd with /alias is not called when accessing /alias servlet registered with empty httpcontextid. It was not the case with 2018-12. Was this change expected ?

[Updated on: Fri, 29 March 2019 17:58] by Moderator

Re: [HttpService] Filter registration behavior change in 2019-03 [message #1804806 is a reply to message #1804685] Mon, 01 April 2019 10:13 Go to previous messageGo to next message
Eclipse UserFriend
I have filled a bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=546008 with a very simple project attached allowing to reproduce the issue, as it seems a bug to me.
Re: [HttpService] Filter registration behavior change in 2019-03 [message #1807424 is a reply to message #1804806] Wed, 29 May 2019 12:32 Go to previous message
Eclipse UserFriend
I tried your test project.
As you stated it fails to call the filter.

What needs to be changed to make the filter called.

I tried to use this plugin setup but it fails:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
     <extension
           id="testHttpcontext"
           point="org.eclipse.equinox.http.registry.httpcontexts">
        <httpcontext
              id="testintest">
           <resource-mapping path="/hello"/>
        </httpcontext>
     </extension>
     <extension
         point="org.eclipse.equinox.http.registry.servlets">
      <servlet
            alias="/hello"
            class="hello.servlet.HelloServlet">
      </servlet>
   </extension>
   <extension
         id="testFilter"
         point="org.eclipse.equinox.http.registry.filters">
      <filter
            alias="/hello"
            httpcontextId="hello.servlet.testintest"
            class="hello.filter.HelloFilter">
      </filter>
   </extension>
</plugin>
Previous Topic:Running part of bundles in separate process
Next Topic:Logger log level
Goto Forum:
  


Current Time: Tue May 20 09:45:56 EDT 2025

Powered by FUDForum. Page generated in 0.04744 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top