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

Ok that's what I needed I think ! Thanks a lot.

I have read in the docs that Orion's server part wasn't meant to be customized this way. Looks like (and it makes sense too) one should instead to use the HTTP APIs in order to build new functionalities, making them "portable" without modifying the server...

So I'm now hesitating : host my servlet in Orion server ? Or deploy into another container and use XD/JSONP in my editor plugin(s) (which I currently do) ?

Cheers

Rémi


From: Paul Webster <pwebster@xxxxxxxxxxxxxxxxxxx>
To: Orion developer discussions <orion-dev@xxxxxxxxxxx>
Date: 26/01/2015 15:19
Subject: Re: [orion-dev] Adding custom servlets to Orion
Sent by: orion-dev-bounces@xxxxxxxxxxx





Sorry, you're right.  That was just hooking in static resources/_javascript_.

To provide a servlet class, use something like:
   <extension
         point="org.eclipse.equinox.http.registry.servlets">
      <servlet
            alias="/gitapi"
            class="org.eclipse.orion.server.git.servlets.GitServlet">
      </servlet>
      <serviceSelector
            filter="(
other.info=org.eclipse.orion)">
      </serviceSelector>
   </extension>


On Mon, Jan 26, 2015 at 9:03 AM, Remi Vankeisbelck <VANKEISB@xxxxxxxxxx> wrote:
Hi Paul,

Thanks for the prompt answer.


I don't understand where the servlet class(es) is defined and mapped to URL(s).


What I understand from the example is that a
http://.../paul context is now available, and that it'll serve files under /web/paul in the org.eclipse.orion.paul bundle. is that correct ?

If so, where is the servlet class ?


Thanks,


Rémi


From: Paul Webster <pwebster@xxxxxxxxxxxxxxxxxxx>
To: Orion developer discussions <orion-dev@xxxxxxxxxxx>
Date: 26/01/2015 14:11
Subject: Re: [orion-dev] Adding custom servlets to Orion
Sent by: orion-dev-bounces@xxxxxxxxxxx







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
_______________________________________________
orion-dev mailing list

orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/orion-dev


Sauf indication contraire ci-dessus:/ Unless stated otherwise above:
Compagnie IBM France
Siège Social : 17 avenue de l'Europe, 92275 Bois-Colombes Cedex
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 657.364.587 €
SIREN/SIRET : 552 118 465 03644 - Code NAF 6202A


_______________________________________________
orion-dev mailing list

orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/orion-dev



--

Paul Webster
Hi floor.  Make me a sammich! - GIR
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev


Sauf indication contraire ci-dessus:/ Unless stated otherwise above:
Compagnie IBM France
Siège Social : 17 avenue de l'Europe, 92275 Bois-Colombes Cedex
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 657.364.587 €
SIREN/SIRET : 552 118 465 03644 - Code NAF 6202A

Back to the top