Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Bundle with static website
Bundle with static website [message #1821092] Wed, 05 February 2020 13:54 Go to next message
Ombre Hammo is currently offline Ombre HammoFriend
Messages: 3
Registered: February 2020
Junior Member
Hello, I'm beginner in kura, so please don't kill me. :)

I tried to add to my kura bundle with static page (builder in vue), but now I have a little problem, it's looks like working properly, but I don't have any idea how to enter this website (I tried localhost:8080/webpage and other similar websites).

I create new bundle, it look's like that:
private HttpService httpService;

    @Reference(name = "HttpService", unbind = "unbindHttpService")
    protected void bindHttpService(HttpService httpService) {
        this.httpService = httpService;
    }
    protected void unbindHttpService(HttpService httpService) {
        this.httpService = null;
    }
 @Activate
    protected void activate(ComponentContext componentContext, Map<String, Object> properties) {
        try {
            httpService.registerResources("/webpage", "www", null);
            LOGGER.info("Registred Resources!");

        } catch (NamespaceException e) {
            LOGGER.error("Could not register resources.", e);
        }
    }


My target file, after building project:
classes -> com, www
(...) some dependency files, tests(..)
bundle.jar
Re: Bundle with static website [message #1821444 is a reply to message #1821092] Thu, 13 February 2020 08:03 Go to previous message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 391
Registered: July 2015
Location: Italy
Senior Member
Hi,
you may have a look at this example here: https://github.com/dwoodard1/kura_examples/tree/master/org.dwoodard.kura.example.web
I believe it setups almost what you are looking for.

Best regards,
Matteo
Previous Topic:/CONF-V1/PUT/configurations/PositionService not working
Next Topic:Kura on raspberry pi3
Goto Forum:
  


Current Time: Mon Jul 06 03:59:59 GMT 2020

Powered by FUDForum. Page generated in 0.01689 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top