Uploaded image for project: 'Spring OSGi'
  1. Spring OSGi
  2. OSGI-629

Configure Jetty through external jetty.xml

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: WEB
    • Labels:
      None

      Description

      The current means of configuring Jetty is by installing a fragment containing an alternate etc/jetty.xml configuration file. This mechanism works, but is awkward...especially for system administrators who aren't comfortable building an OSGi fragment.

      Attached is a patch for Activator.java that looks for a Jetty configuration file at a URL specified by the jetty.config.url property. This could be any legitimate URL, including HTTP and FILE URLs. If jetty.config.url is set and if there is a file at that location, it will be used. Otherwise, it falls back on the current behavior, which looks for etc/jetty.xml and then etc/default-jetty.xml.

      Note that the contents of the file at the specified URL aren't validated...only that they exist. If the file at that location is invalid, Jetty will fail to start.

      This is a suitable alternative to OSGI-600, which recommends that Jetty/Tomcat be configured by the configuration admin service. This solution may even be more desirable than what is described in OSGI-600, as it enabled Jetty to be configured in a way that is very similar to how a non-OSGi Jetty server is configured.

        Attachments

          Activity

            People

            Assignee:
            costin Costin Leau
            Reporter:
            habuma Craig Walls
            Votes:
            7 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: