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
