You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Thomas Driessen <th...@ds-lab.org> on 2015/06/08 16:21:23 UTC

Re: Servlet whiteboard registration vs. direct registration - Filter not working

Hi Carsten,

sry for bothering you again, but I still have the same problem as before.

I checked out the recent code from github, compiled everything, used the
property osgi.http.whiteboard.context.name=org.osgi.service.http,
 but still Filters and Servlets registered via the whiteboard mechanism
seem to have another ServletContext than those registered directly via
HttpContext or ExtHttpContext.
Whiteboard-Filter intercept requests to Whiteboard-Servlets but none else.
ExtHttpService-Filter intercept requests to all other Servlets but
Whiteboard-Servlets.
Shouldn't that be changed by using the above mentioned property? I thought
I have to set the property in order to force Whiteboard-registered Filters
/ Servlets to use the same ServletContext as those registered directly over
HttpService/ExtHttpService.

I've created a sample setup for you on
https://github.com/Sandared/filtertestsetup so that you might have a look
on it.
Perhaps I'm missing something.

Best regards,
Thomas

2015-05-27 15:46 GMT+02:00 Thomas Driessen <th...@ds-lab.org>:

> Hi Carsten,
>
> thanks a lot for that quick fix :) I'll see if it works in my setup within
> the next days.
>
> Best regards,
> Thomas
>
>
> 2015-05-27 14:53 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:
>
>> I've committed an untested version to svn. If you register a whiteboard
>> service with the select property set to
>> "(osgi.http.whiteboard.context.name=org.osgi.service.http)" this
>> whiteboard service will be registered in the context of the http
>> service, which means a filter will be applied to such servlets.
>>
>> Carsten
>> --
>> Carsten Ziegeler
>> Adobe Research Switzerland
>> cziegeler@apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
>
> --
> M.Sc. Thomas Driessen
> Software Methodologies for Distributed Systems
> Institute of Computer Science
> University of Augsburg
> Universitätsstr. 6a
> 86135 Augsburg, Germany
>
> Tel:    +49 821 598-2486
> email: thomas.driessen@informatik.uni-augsburg.de
>



-- 
M.Sc. Thomas Driessen
Software Methodologies for Distributed Systems
Institute of Computer Science
University of Augsburg
Universitätsstr. 6a
86135 Augsburg, Germany

Tel:    +49 821 598-2486
email: thomas.driessen@informatik.uni-augsburg.de

Re: Servlet whiteboard registration vs. direct registration - Filter not working

Posted by Thomas Driessen <th...@ds-lab.org>.
I completly skipped the osgi.http.whiteboard.context.select in your last
mail.

It works!

Thank you so much :)

2015-06-08 16:38 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:

> Hi Thomas,
>
> you need to set the property osgi.http.whiteboard.context.select
> to the value
> "(osgi.http.whiteboard.context.name=org.osgi.service.http)"
> for the whiteboard services. This should attach them to the default
> context of the http service.
>
> (The property osgi.http.whiteboard.context.name is not supported for
> whiteboard services - except when registering a context)
>
> Regards
> Carsten
>
> Am 08.06.15 um 16:21 schrieb Thomas Driessen:
> > Hi Carsten,
> >
> > sry for bothering you again, but I still have the same problem as before.
> >
> > I checked out the recent code from github, compiled everything, used the
> > property osgi.http.whiteboard.context.name=org.osgi.service.http,
> >  but still Filters and Servlets registered via the whiteboard mechanism
> > seem to have another ServletContext than those registered directly via
> > HttpContext or ExtHttpContext.
> > Whiteboard-Filter intercept requests to Whiteboard-Servlets but none
> else.
> > ExtHttpService-Filter intercept requests to all other Servlets but
> > Whiteboard-Servlets.
> > Shouldn't that be changed by using the above mentioned property? I
> thought
> > I have to set the property in order to force Whiteboard-registered
> Filters
> > / Servlets to use the same ServletContext as those registered directly
> over
> > HttpService/ExtHttpService.
> >
> > I've created a sample setup for you on
> > https://github.com/Sandared/filtertestsetup so that you might have a
> look
> > on it.
> > Perhaps I'm missing something.
> >
> > Best regards,
> > Thomas
> >
> > 2015-05-27 15:46 GMT+02:00 Thomas Driessen <th...@ds-lab.org>:
> >
> >> Hi Carsten,
> >>
> >> thanks a lot for that quick fix :) I'll see if it works in my setup
> within
> >> the next days.
> >>
> >> Best regards,
> >> Thomas
> >>
> >>
> >> 2015-05-27 14:53 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:
> >>
> >>> I've committed an untested version to svn. If you register a whiteboard
> >>> service with the select property set to
> >>> "(osgi.http.whiteboard.context.name=org.osgi.service.http)" this
> >>> whiteboard service will be registered in the context of the http
> >>> service, which means a filter will be applied to such servlets.
> >>>
> >>> Carsten
> >>> --
> >>> Carsten Ziegeler
> >>> Adobe Research Switzerland
> >>> cziegeler@apache.org
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>> For additional commands, e-mail: users-help@felix.apache.org
> >>>
> >>>
> >>
> >>
> >> --
> >> M.Sc. Thomas Driessen
> >> Software Methodologies for Distributed Systems
> >> Institute of Computer Science
> >> University of Augsburg
> >> Universitätsstr. 6a
> >> 86135 Augsburg, Germany
> >>
> >> Tel:    +49 821 598-2486
> >> email: thomas.driessen@informatik.uni-augsburg.de
> >>
> >
> >
> >
>
>
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
M.Sc. Thomas Driessen
Software Methodologies for Distributed Systems
Institute of Computer Science
University of Augsburg
Universitätsstr. 6a
86135 Augsburg, Germany

Tel:    +49 821 598-2486
email: thomas.driessen@informatik.uni-augsburg.de

Re: Servlet whiteboard registration vs. direct registration - Filter not working

Posted by Carsten Ziegeler <cz...@apache.org>.
Hi Thomas,

you need to set the property osgi.http.whiteboard.context.select
to the value
"(osgi.http.whiteboard.context.name=org.osgi.service.http)"
for the whiteboard services. This should attach them to the default
context of the http service.

(The property osgi.http.whiteboard.context.name is not supported for
whiteboard services - except when registering a context)

Regards
Carsten

Am 08.06.15 um 16:21 schrieb Thomas Driessen:
> Hi Carsten,
> 
> sry for bothering you again, but I still have the same problem as before.
> 
> I checked out the recent code from github, compiled everything, used the
> property osgi.http.whiteboard.context.name=org.osgi.service.http,
>  but still Filters and Servlets registered via the whiteboard mechanism
> seem to have another ServletContext than those registered directly via
> HttpContext or ExtHttpContext.
> Whiteboard-Filter intercept requests to Whiteboard-Servlets but none else.
> ExtHttpService-Filter intercept requests to all other Servlets but
> Whiteboard-Servlets.
> Shouldn't that be changed by using the above mentioned property? I thought
> I have to set the property in order to force Whiteboard-registered Filters
> / Servlets to use the same ServletContext as those registered directly over
> HttpService/ExtHttpService.
> 
> I've created a sample setup for you on
> https://github.com/Sandared/filtertestsetup so that you might have a look
> on it.
> Perhaps I'm missing something.
> 
> Best regards,
> Thomas
> 
> 2015-05-27 15:46 GMT+02:00 Thomas Driessen <th...@ds-lab.org>:
> 
>> Hi Carsten,
>>
>> thanks a lot for that quick fix :) I'll see if it works in my setup within
>> the next days.
>>
>> Best regards,
>> Thomas
>>
>>
>> 2015-05-27 14:53 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:
>>
>>> I've committed an untested version to svn. If you register a whiteboard
>>> service with the select property set to
>>> "(osgi.http.whiteboard.context.name=org.osgi.service.http)" this
>>> whiteboard service will be registered in the context of the http
>>> service, which means a filter will be applied to such servlets.
>>>
>>> Carsten
>>> --
>>> Carsten Ziegeler
>>> Adobe Research Switzerland
>>> cziegeler@apache.org
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>>
>>
>> --
>> M.Sc. Thomas Driessen
>> Software Methodologies for Distributed Systems
>> Institute of Computer Science
>> University of Augsburg
>> Universitätsstr. 6a
>> 86135 Augsburg, Germany
>>
>> Tel:    +49 821 598-2486
>> email: thomas.driessen@informatik.uni-augsburg.de
>>
> 
> 
> 


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org