Environment: Karaf 4.0.9
Using Camel to register as a servlet like
<reference id="httpService"
interface="org.osgi.service.http.HttpService"/>
<bean id="camelServlet"
class="org.apache.camel.component.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.