Hello

Karaf 4.0.9 uses pax-web 4.3.0. Please see fix for https://ops4j1.jira.com/
browse/PAXWEB-981 - especially this commit: https://github.com/ops4j/org.
ops4j.pax.web/commit/e3fc5d868a865f641a7e3924471ef05970090414.

Initially "other handlers" were called because there could be NCSALogger
available and it should be invoked. But then we've switched to "call other
non-ContextHandler handlers" - so both NCSA logger is called AND no more
real "web apps" are called when handling given request URI.

regards
Grzegorz Grzybek

2017-09-15 19:31 GMT+02:00 Martin Lichtin <[email protected]>:

> Environment: Karaf 4.0.9
> Using Camel to register as a servlet like
>
>   <reference id="httpService" interface="org.osgi.service.ht
> tp.HttpService"/>
>   <bean id="camelServlet" class="org.apache.camel.compon
> ent.servlet.CamelHttpTransportServlet" />
>   <bean id="httpContext" class="my.path.MyHttpContext" />
>   <bean class="org.apache.camel.component.servlet.osgi.OsgiServletRegisterer"
> init-method="register" destroy-method="unregister">
>     <property name="alias" value="/rest" />
>     <property name="httpService" ref="httpService" />
>     <property name="httpContext" ref="httpContext" />
>     <property name="servlet" ref="camelServlet" />
>   </bean>
>
> I noticed that the httpContext is called also for requests outside /rest.
> How come?
>
> For example, making a request for /foo, I see
>
> 2017-09-15 19:27:12,236 | DEBUG | qtp770314750-202         |
> ServerModel                      | eb.service.spi.model.ServerModel  338
> | 214 - org.ops4j.pax.web.pax-web-spi - 4.3.0 | Path [/foo] does not match
> any context
> 2017-09-15 19:27:12,236 | DEBUG | qtp770314750-202         |
> HttpServiceContext               | etty.internal.HttpServiceContext  285
> | 212 - org.ops4j.pax.web.pax-web-jetty - 4.3.0 | Handling request for
> [/foo] using http context [my.path.MyHttpContext@42bf376e]
>
> I would not have expected the HttpContext to be called in that
> circumstance.
>
> --
> --
> ------------------
> 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.
>

-- 
-- 
------------------
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