felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Engström <epirea...@gmail.com>
Subject Re: Setting up Http Servlet Bridge (relative paths)
Date Thu, 11 Feb 2016 08:24:42 GMT
Thanks a lot for replying!

I’ll dig into the oak-standalone sample code to see what’s different from my sample application.

I’ve added the Felix WebConsole to my sample app @ https://github.com/metamorph/http-osgi-bridge/tree/add-felix-webconsole
<https://github.com/metamorph/http-osgi-bridge/tree/add-felix-webconsole> as well —
but in order to access the console at http://localhost:8080/osgi/system/console <http://localhost:8080/osgi/system/console>
I’m forced to mount the WebConsole root servlet at the full path (-Dfelix.webconsole.manager.root=/osgi/system/console).

I still haven’t seen a plain, bare-bone, no fuzz, example of using the Felix Http Bridge/Proxy
when the proxy-servlet isn’t bound to the “/*”.   My sample-app is, imo, as clean and
bare-bone as possible - but I can’t find a way to dispatch requests to the osgi-servlets
without binding them to the full (in-context) path :/

/Anders

> On 11 Feb 2016, at 04:43, Chetan Mehrotra <chetan.mehrotra@gmail.com> wrote:
> 
> HI Anders,
> 
>> Everything seems to work, if I register servlets (in the OSGi container) to the path
`/bundles/{servlet}`. That is — the OSGi component registering the Servlet *needs* to know
to which context path the proxy servlet is mapped.
> 
> Have a look at [1] where there ProxyServlet is registered with
> '/osgi/*' and it works fine. The application is based on Felix Connect
> and Spring Boot but the OSGi constructs used should be common to your
> usecase
> 
> You can launch the app using
> 
> java -jar target/oak-standalone-1.4-SNAPSHOT.jar --server.contextPath=/foo
> 
> Then the Felix WebConsole is accessible at
> http://localhost:8080/foo/osgi/system/console where 'foo' is
> contextPath and 'osgi' is the path against which the ProxyServlet is
> bound
> 
> Chetan Mehrotra
> [1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-examples/standalone/src/main/java/org/apache/jackrabbit/oak/standalone/WebConsoleSupport.java
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message