Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page

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


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire