[ 
https://issues.apache.org/jira/browse/FELIX-379?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Felix Meschberger updated FELIX-379:
------------------------------------

    Attachment: FELIX-379.patch

Did a rework of the http.jetty bundle such that now only a single Jetty 
ServletHandler is registered together with a single Jetty ServletHttpContext. 
This handler/context tuple is used to register all servlets framework wide 
registered with the http.jetty HttpService. This is required to be able to 
conform to the "single namespace for all servlets" requirement of the Http 
Service Spec.

In addition, just for completeness, I reformatted the code according to the 
Felix coding conventions and cleaned up all import lists.

Does anyone mind, if I would apply this patch ?

> Registering multiple servlets may hide some
> -------------------------------------------
>
>                 Key: FELIX-379
>                 URL: https://issues.apache.org/jira/browse/FELIX-379
>             Project: Felix
>          Issue Type: Bug
>          Components: HTTP Service
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>         Attachments: FELIX-379.patch
>
>
> Consider registering a servlet RootServlet for "/" first and then a servlet 
> SomeServlet for "/some" with different OSGi HttpContext instances in this 
> order with the http.jetty HttpService. This registration works absolutely 
> correct and also creates the necessary setup internally. Unfortunately, when 
> Jetty now receives a request for "/some", it first calls the RootServlet 
> instead of the SomeServlet as would be expected according to the HttpServlet 
> Service specification.
> If the servlets are registered SomeServlet first and then RootServlet it 
> works perfectly.
> I think it is related to the fact, that the http.jetty bundle registers a 
> jetty context for "/" for each different OSGi HttpContext and jetty asks 
> these registrations in registration order, which may not be correct according 
> to the spec. Probably, there should only be one actual web app registration 
> with jetty and the http.jetty bundle should multiplex between the different 
> OSGi HttpContext instances and select the correct servlets.
> I am working a possible solution to this right now.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to