Http Service Httpcontexts

org.eclipse.equinox.http.registry.httpcontexts

1.0

Provides an OSGi Http Service HttpContext identified by id.

<!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>


<!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.



<!ELEMENT resource-mapping EMPTY>

<!ATTLIST resource-mapping

path   CDATA #IMPLIED

bundle CDATA #IMPLIED>


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.

The httpcontext class must be an instance of org.osgi.service.http.HttpContext.