Deploying RAP Applications Made Simple – Introducing the Virgo RAP Server

Deploying RAP Applications Made Simple – Introducing the Virgo RAP Server

Yes, we love building modular web applications, if they just were easier to deploy on a server! Wrapping OSGi applications in WAR files, apparently still the most popular deployment option for RAP, results in a complicated setup: a web app containing an OSGi runtime together with all bundles, configuration, and a bridge servlet that delegates requests to the embedded OSGi – that’s hard to build, hard to change, and hard to debug. Why can’t we just throw our application bundles into a webserver and simply turn it on?

Actually, we already have this technology in Eclipse, we just need to make it easier to use. To do so, the Eclipse RAP project and the Virgo project recently worked together to create a lightweight server for RAP applications that supports those out-of-the-box deployments. This package, we call it the “Virgo RAP Server”, is an OSGi container based on Equinox, running the Jetty web server, and it’s pre-equipped with all bundles required to run a RAP application – with one exception: workbench applications are not (yet) supported.

A first version is now available on the Virgo build server. This download always contains the latest RAP bundles (RAP 2.3 M1 at the time of writing).

[ More on RAP from our blog: RAP technology overview | Using RAP or Virgo in an industrial setting? Our technology subscriptions secure your investment for years to come. ]

Getting started

Running your application on this server requires only these three steps:

1. Extract the zip file to a folder of your choice

$ unzip
$ cd virgo-nano-rap-3.7.0.CI-2014-02-21_02-04-03

2. Copy your application bundles into the pickup/ directory

$ cp ~/org.example.rap-1.0.0.jar pickup/

3. Start the server using the startup script in bin/

$ bin/

That’s it! Now you can access your application at https://localhost:8080/example (replace “/example” with the servlet path of your entrypoint).

Admin console

The Virgo RAP server comes with a nice admin console that can also display package and service wirings between bundles. You can access it at https://localhost:8080/admin. The default credentials are admin:admin.


If you want to get rid of the console for production, simply remove the bundle from the pickup/ directory.


Here’s are short list of things you may like to configure:

Change HTTP port

Per default the embedded Jetty is running on port 8080. The port can be configured in configuration/config.ini.


Enable Equinox OSGi console

The OSGi console is deactivated by default. It can be enabled for access via SSH and/or telnet in configuration/



The log files can be found in serviceability/logs. Logging is configured in configuration/serviceability.xml, for a description of the syntax and facilities provided by this file, please consult the LOGBack Manual.


To enable remote debugging, start the server in debug mode by adding the parameter -debug to the startup script. Optionally you can also add the -suspend flag to suspend the VM on startup until your IDE connects. For example, you can use this method to observe the startup of your already deployed bundles.


If there’s interest in this deployment option, we plan to provide a stable version of the Virgo RAP server together with this year’s Eclipse release “Luna”, in June 2014.

Let us know what you think! Could this be an interesting option for your project?

  • Neil Mackenzie
    Posted at 14:17, 2014-02-24

    That looks great. I spent my whole day yesterday trying to deploy an RAP/OSGI app using WAR Products! it turned out my problem was because I was using tomcat 8, but it took me a long time to find that out as the documentation and and ability to troubleshoot is not so clear using WAR Product. RAP is great technology, so tooling that makes it easier to run and test is very welcome!

  • Cole Markham
    Posted at 18:16, 2014-02-24

    That’s awesome, I’ve been wanting this for quite some time. What’s required to support workbench apps? Sounds like a good challenge to add that support at the EclipseCon hackathon.

  • Dave Joyce
    Posted at 19:25, 2014-02-24

    We are embarking on a major initiative to migrate from an old Eclipse 3.x RCP app into a new Eclipse 4 platform app using RCP or RAP. The availability of Virgo RAP Server for simplified deployment could be a game changer!

  • Timo Rohrberg
    Posted at 08:23, 2014-02-27

    This sound absolutely fantastic! Deployment of RAP application was always a bit of a hassle. With this Virgo RAP server, it becomes as easy as a charm! To futher push that approach is definitely worth it!

    What I don’t understand yet is, why are workbench applications not (yet) supported? What exactly is the problem? And are there any plans to fix that in near future?

  • Florian Waibel
    Posted at 10:40, 2014-02-27

    @Cole: That’s a good idea. I will definitely drop by at the EclipseCon hackathon.

  • Arun Kumar
    Posted at 10:39, 2014-03-27

    This is AWESOME!!! Just came to know about this server from the “EclipseSource Developer News” email. Deploying RAP apps on non-OSGI server is certainly a headache. Warproducts functionality is certainly a boon towards solving this problem but I would still prefer to use an open-source OSGI-based server to deploy my apps on.

    I “one-up” this initiative!!

    If the tutorial for running workbench applications on this server has been published, can someone point me towards it please. Thanks in advance.

  • Philippe
    Posted at 09:45, 2014-04-23

    Oh, thats so cool. I am currently frustrated in deploying by warproducs (cycle pain). Spend almost a day without any positive result. So I decided to go with your, the more forward way of an osgi jetty server.

    Since I need the workbench, I’m curious on any news. Did you keep up working on the workbench part?
    Unfortunately, the provided link to a virgo server (no workbench) is not working anymore.

  • Hesham Saleh
    Posted at 12:00, 2014-04-23

    Great news, RAP was always an interesting project, putting extra effort in tooling to create a simpler bundle is always a step in the right direction when it comes to OSGi-related technologies, I hope it gathers more interest from the community to keep the integration project alive and making it easier for simple out-of-the-box deployments, which definitely would attract more to the RAP area.

  • Florian Waibel
    Posted at 15:25, 2014-05-16

    @Philippe: Sorry for the late response. I overlooked your comment somehow. The anonymous permission was missing in the Virgo Hudson instance after an update to 3.1.2. The link is working again.

  • John Zhang
    Posted at 08:00, 2014-05-18

    Would be nice if have a built-in RAP example.