Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The URL Handlers service extends the standard Java URL stream and content handler mechanism to work in an OSGi environment. The way that built-in URL protocol and content handlers are discovered is by probing packages for the appropriate classes to handle the protocol/content. For example, the default package for Sun protocol handlers is:

No Format
   {{sun.net.www.protocol}}

If someone tries to create a URL for the "http" protocol, then the class to handle the protocol will be:

No Format
   {{sun.net.www.protocol.http.Handler}}

A similar process is followed for content handlers, whose default package is:

No Format
   {{sun.net.www.content}}

If you are running on a VM that is different than Sun's, then you must determine what are the default packages used for its protocol and content handlers. Once you know this information, then you can configure Felix to use those packages instead of the default one. You can configure Felix by setting the following configuration properties in the config.properties file:

No Format
   {{java.protocol.handler.pkgs}}

and

No Format
   {{java.content.handler.pkgs}}

The value of these properties is a list of "|" delimited package names to be searched for protocol and content handlers, respectively. See the Java documentation for stream and content handlers for more information.

...