>>>>> Steinar Bang <[email protected]>:

>> I have now tried to add a context path to the property argument of
>> the @Component annotation, but that doesn't seem to work: the Vaadin
>> servlet now matches everything from the top (because of the "/*"
>> pattern) and I don't see the context anywhere.

>> The servlet annotation looks like this:
>> @Component(
>>     property= {
>>         HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN+"=/*",
>>         HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_NAME+"=ukelonn",
>>         HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME+"=ukelonn",
>>         HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH+"=/ukelonn"},
>>     service=Servlet.class,
>>     immediate=true
>> )
>> public class UkelonnServlet extends TouchKitServlet {

> As far as I can tell from the code that is called when a Servlet service
> is registered, there is nothing using the HTTP_WHITEBOARD_CONTEXT_NAME
> or WHITEBOARD_CONTEXT_PATH properties:
>  
> https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-extender-whiteboard/src/main/java/org/ops4j/pax/web/extender/whiteboard/internal/tracker/ServletTracker.java#L81

>> The filter annotation looks like this:
>> @Component(
>>     property= {
>>         HttpWhiteboardConstants.HTTP_WHITEBOARD_FILTER_PATTERN+"=/*",
>>         "servletNames=ukelonn",
>>         HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME + "=ukelonn",
>>         HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH + "=/ukelonn"},
>>     service=Filter.class,
>>     immediate=true
>> )
>> public class UkelonnShiroFilter extends AbstractShiroFilter {

> Nothing in the code handling Filter services directly supports the
> HTTP_WHITEBOARD_CONTEXT_NAME or HTTP_WHITEBOARD_CONTEXT_PATH
> properties, either:
>  
> https://github.com/ops4j/org.ops4j.pax.web/blob/master/pax-web-extender-whiteboard/src/main/java/org/ops4j/pax/web/extender/whiteboard/internal/tracker/FilterTracker.java#L52

The handler for the ServletContextHelper service seems to do stuff with
both HTTP_WHITEBOARD_CONTEXT_NAME and HTTP_WHITEBOARD_CONTEXT_PATH, but
I havn't yet determined how it works and how to connect things to a
servlet, and (hopefully also) a Filter.

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to