Http Service Httpcontexts
Identifier:
org.eclipse.equinox.http.registry.httpcontexts
Since:
1.0
Description:
Provides an OSGi Http Service HttpContext identified by id.
Configuration Markup:
<!ELEMENT extension (
httpcontext+)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED
>
<!ELEMENT httpcontext (
resource-mapping* ,
mime-mapping*)>
<!ATTLIST httpcontext
id CDATA #REQUIRED
class CDATA #IMPLIED
>
-
id - The identifier associate with this httpcontext. Outside of this bundle it must be referred to by its full name including bundle namespace.
-
class - The equivalent of the OSGi Http Services "httpcontext" in registerServlet and registerResource. The HttpContext is instantiated by the Extension Point provider and must be an instance of org.osgi.service.http.HttpContext.
<!ELEMENT mime-mapping EMPTY>
<!ATTLIST mime-mapping
extension CDATA #REQUIRED
mime-type CDATA #REQUIRED
>
Similar to the Servlet Specification and its deployment descriptor's mime-mapping elements.
-
extension - The file extension to associate. For example: ps
-
mime-type - The associated mime-type. For example: application/postscript
<!ELEMENT resource-mapping EMPTY>
<!ATTLIST resource-mapping
path CDATA #IMPLIED
bundle CDATA #IMPLIED
>
-
path - The bundle path where resources can be loaded from.
-
bundle - The bundle from where resources are loaded from. If the "bundle" attribute is not present the contributing bundle is used.
Examples:
The following is an example of the
httpcontexts
extension:
<extension
id=
"testHttpcontext"
point=
"org.eclipse.equinox.http.registry.httpcontexts"
>
<httpcontext
id=
"testintest"
>
<resource-mapping path=
"/test"
/>
</httpcontext>
</extension>
This httpcontexts extension will make resources from "/test" in the contributing bundle accessible via the OSGi Http Service's HttpContext getResource method.
Copyright (c) 2005-2007 Cognos Incorporated, IBM Corporation and others
All rights reserved. This program and the accompanying materials are made
available under the terms of the Eclipse Public License v1.0 which
accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-v10.html.
Contributors:
Cognos Incorporated - initial API and implementation
IBM Corporation - bug fixes and enhancements