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 Mon, 15 Feb 2016 18:37:52 GMT
Hi again -

One thing that differs between the jackrabbit standalone-sample and my sample code is the
*version* of the http proxy/bridge libraries.

I’m using org.apache.felix.http.proxy/3.0.0 and org.apache.felix.http.bridge/3.0.6 - in
your sample both those libraries are at version 2.3.2.

Guess what - If I downgrade to 2.3.2 everything works just as expected! If I set the org.apache.felix.http.bridge
dependency to 3.0.0 it no longer works.

I assume this isn’t a known issue (I’ve had a quick look at the Jira issue tracker). If
a maintainer could verify this as a bug it would be super-sweet. I’d be happy to help out
with a patch.

Best regards //Anders



> On 11 Feb 2016, at 09:24, Anders Engström <epirealer@gmail.com> wrote:
> 
> 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 <mailto: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 <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
<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 <mailto:users-unsubscribe@felix.apache.org>
>> For additional commands, e-mail: users-help@felix.apache.org <mailto:users-help@felix.apache.org>
>> 
> 


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