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 Servlets

Identifier:
org.eclipse.equinox.http.registry.servlets

Since:
1.0

Description:
This extension mimics and borrows the semantics of the OSGi HttpService registerServlet method.

Configuration Markup:

<!ELEMENT extension ( serviceSelector? , servlet+)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>


<!ELEMENT servlet ( init-param*)>

<!ATTLIST servlet

class           CDATA #REQUIRED

alias           CDATA #REQUIRED

httpcontextId   CDATA #IMPLIED

load-on-startup (true | false)

>

  • class - The equivalent of the OSGi Http Services "servlet" in registerServlet. The Servlet is instantiated by the Extension Point provider and must be an instance of javax.servlet.Servlet
  • alias - The equivalent of the OSGi Http Services "alias" in registerServlet.
  • httpcontextId - The equivalent of the OSGi Http Services httpcontext in registerResource. The httpcontextId is matched against the "httpcontexts" extension for a matching id. If this attribute is not provided the OSGi Http Service's DefaultHttpContext semantics are used.
  • load-on-startup - Determines if the Servlet should be initialized immediately.

<!ELEMENT init-param EMPTY>

<!ATTLIST init-param

name  CDATA #REQUIRED

value CDATA #REQUIRED

>

Similar to the Servlet Specification and its deployment descriptor's init-param elements.


  • name - The initial parameter's name
  • value - The initial parameter's value

<!ELEMENT serviceSelector EMPTY>

<!ATTLIST serviceSelector

filter CDATA #IMPLIED

class  CDATA #IMPLIED

>

  • filter - The serviceSelector allow filtering of the HttpService instances with which to register servlets.
  • class - If used the class must be an instance of org.osgi.framework.Filter

Examples:
The following is an example of the servlets extension:

     <extension
           id=
"testServlet"

           point=
"org.eclipse.equinox.http.registry.servlets"
>
        <servlet
              alias=
"/sp_test"

              class=
"org.eclipse.equinox.http.registry.internal.TestServlet"
>
           <init-param
                 name=
"testParam"

                 value=
"test param value"
>
           </init-param>
        </servlet>
     </extension>

This equivalent to the OSGi Http Service's registerServlet 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