Previous Topic

Next Topic

Book Contents

Book Index

HTTP Aliases

HTTP components are accessed through aliases that map client requests to specified resources or servlets. An alias is a pseudonym under which the corresponding servlet or resource can be found.

The HTTP Service introduces the following alias format:

The alias name begins with a "/" and must not end with a "/". The HTTP Service is case sensitive towards aliases. Registration of "/" alias stands for the URI of the start page of the OSGi Runtime.

For example a client can invoke an alias in the following way:

<mbs_host> stands for the IP address or DNS name of the device running the OSGi Runtime and the HTTP Bundle, <http_port> is the port on which the HTTP server is listening for requests (if the server port is 80, the port number can be omitted from the URL), and <alias_name> is the alias assigned to a resource or a servlet.

The HTTP Bundle offers an extra feature for aliases – alternative aliases. It allows to easily map a "fake" alias to another alias which on its behalf is associated with a servlet or a resource.

For more details about alias mapping, refer to the HTTP Service Specification.