I spent many days trying to figure out how to add a site to OSGi.
I have a hava Web service launched with the Jetty extension to use Jetty as a connector. This feature provides various resources at multiple URLs.
But I would also like to have a small website running on the system that the user can access. I wanted to use some HTML, Javascript, CSS and provide the current status of the data using some graphs and images.
I assume that since Jetty is running in the background, I can deploy this site to Jetty and possibly call the server resources provided by Restlet in Javascript.
Apparently nothing worked except relaxation services.
My question is, can I add a WAB package and wait for it to work (since Jetty is running in the background)? Or is there a better way to add a site to OSGi? Or The only option that I have now, since you can return the HTML form as a view, add all the javascript code inside the HTML form and send it in response to a GET request (which I think is a mess).
Everything will work in raspberry pi, so that I can only have a small size. I am using Equinox, Restlet 2.3.0 and Jetty 9.2.6.
I would really appreciate if someone knows a link where I can get information on how to get at least a sample page in OSGi. I tried many, no luck.
source
share