Hi All and thank you for your support, the solution suggested by Christian seems to me the simplest at the moment.
Where can I find more documentation on how "Web-ContextPath" works? Do "Web-ContextPath" is an OSGi header or is it a Karaf specific header? does it is implemented using some some sub-project (i.e. Pax Web) ? thank you, Cristiano Il giorno mer 29 mar 2017 alle ore 12:12 Christian Schneider < ch...@die-schneider.net> ha scritto: > I used this approach for a small angular UI: > > https://github.com/cschneider/Karaf-Tutorial/tree/master/tasklist-blueprint-cdi/angular-ui > > I just added Web-ContextPath to the Manifest and used the > src/main/resources to deploy the static files. > Web-ContextPath: /tasklist > > Christian > > 2017-03-29 11:10 GMT+02:00 Cristiano Costantini < > cristiano.costant...@gmail.com>: > > Hello all, > > which the best practices to publish a web application from Karaf currently > in 2017? > > I know that it exists the WebContainer ( > https://karaf.apache.org/manual/latest/webcontainer) which supports both > publishing of WABs or WARs to Karaf. > > I however see different approaches, used in conjunction with Javascript > frameworks like Angular or Polymer, where the server side logic is reduced > to REST services (no JSP required) which rely simply on the OSGi HTTP > service to serve HTML and JS files. > > (one example, I stumbled onto the Openmuc project, it has an Angular > application, > https://github.com/gythialy/openmuc/tree/master/projects/webui/base, > which is published by a regular bundle, its web files are inside the > src/main/resource folder - note: this is a bundle running on felix, does > not need karaf). > > I like the second kind of approach and it seems to me more suitable for JS > framework like Polymer which I am studying right now. Also, I've tried the > first approach but it was hard to make it work in Karaf the server side > dependencies we had, so as today, we run our application on a standalone > jetty or glassfish container. > > To go back to my initial question, what kind of approach do you recommend? > Are there any recent sample or well made open source project or any maven > archetype to use as starting point reference? > > I would like to hear also personal opinions :-) > > Thank you very much! > Cristiano > > > > > > > > -- > -- > Christian Schneider > http://www.liquid-reality.de > <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.liquid-reality.de> > > Open Source Architect > http://www.talend.com > <https://owa.talend.com/owa/redir.aspx?C=3aa4083e0c744ae1ba52bd062c5a7e46&URL=http%3a%2f%2fwww.talend.com> >