Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4234

Using HttpService provided by Felix Jetty bundle

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Trivial
    • Resolution: Not A Problem
    • http-2.2.0
    • http-2.2.0
    • HTTP Service
    • Several hardware configurations
      Operating System Ubuntu 12.10 amd64

    Description

      I'm new in using Felix implementation of OSGi and I'm trying to start the Jetty bundle and register a simple servlet, but I have a problem in getting the Service Reference of HttpService. In details, I made the following steps:
      1) Get Felix framework from the proper site
      2) Get the Jetty bundle (org.apache.felix.http.jetty) from the same site and insert it in the /bundle folder (the auto-deploy folder)
      3) Write my little training bundle made by Activator+Little servlet+Manifest file
      4) Create a jar of my bundle
      5) Put the jar into /bundle folder (the same where Jetty bundle is put in)
      6) In the config.properties file write the property org.apache.felix.http.enable=true
      7) Start the felix framework typing "sudo java -jar /bin/felix.jar" from the install folder of felix

      In this way it seems that Jetty starts on localhost:8080 (I see 404 Error into the browser), but I have no reference for HttpService. In details, in the activator I have this line:

      ServiceReference<?> ref=context.getServiceReference(HttpService.class.getName());

      but ref is always null. The same happens if I start Jetty and then my little bundle. What am I doing wrong?

      Attachments

        Activity

          People

            Unassigned Unassigned
            netgroup Luca Capano
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: