Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 19:05 Go to next message
Arnaud MERGEY is currently offline Arnaud MERGEYFriend
Messages: 243
Registered: March 2010
Location: France
Senior Member
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 19:50 Go to previous messageGo to next message
Arnaud MERGEY is currently offline Arnaud MERGEYFriend
Messages: 243
Registered: March 2010
Location: France
Senior Member
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 21:58]

Report message to a moderator

Re: [HttpService] Filter registration behavior change in 2019-03 [message #1804806 is a reply to message #1804685] Mon, 01 April 2019 14:13 Go to previous messageGo to next message
Arnaud MERGEY is currently offline Arnaud MERGEYFriend
Messages: 243
Registered: March 2010
Location: France
Senior Member
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 16:32 Go to previous message
Horst Scheruga is currently offline Horst ScherugaFriend
Messages: 1
Registered: May 2019
Junior Member
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: Mon Sep 20 00:05:56 GMT 2021

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

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

Back to the top