Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Adding custom servlets to Orion

On Mon, Jan 26, 2015 at 5:54 AM, Remi Vankeisbelck <VANKEISB@xxxxxxxxxx> wrote:
Hi,

Is there a way to add custom Servlets to an Orion server ?


One ways is to create a plugin to be installed in your server and add 2 extension points, one to map the plugin directory to a context and one to map a context to a URL resource.  Here's an example from one of my plugins:


   <extension
         point="org.eclipse.equinox.http.registry.httpcontexts">
      <httpcontext
            id="org.eclipse.orion.server.httpcontext.paul">
         <resource-mapping
               bundle="org.eclipse.orion.paul"
               path="/web/paul">
         </resource-mapping>
      </httpcontext>     
   </extension>
   <extension
         point="org.eclipse.equinox.http.registry.resources">
      <resource
            alias="/paul"
            httpcontextId="org.eclipse.orion.server.httpcontext.paul">
      </resource>
      <serviceSelector
            filter="(other.info=org.eclipse.orion)">
      </serviceSelector>
   </extension>


--
Paul Webster
Hi floor.  Make me a sammich! - GIR

Back to the top