My Wiki!

RCP Jetty

Embedded Jetty in RCP

Other sources:

If error permission denied when starting jetty:

The solution is to apply this JVM argument on the arguments tab:

-Dorg.osgi.service.http.port=8888 OR
-Dorg.eclipse.equinox.http.jetty.http.port=8888

Embedded Jetty tutorial

There is existing RCP plugin project. Additional projects:

  • Create feature with all jetty plugin required

Configure dependencies of existing projects.

  • Add the feature to product's feature list
  • Add plugins to dependencies list of RCP plugin
    • org.eclipse.equinox.http.jetty
    • org.eclipse.equinox.http.registry
    • org.eclipse.jetty.server
    • javax.servlet

Add Jetty server code:

  • Code to Start jetty server in Activation class


Create Main servlet handler: de.dailab.acs.attack.gui.web.ServletMain


  • Add extension point for servlet handler.
    • Open RCP MANIFEST, extensions tab
    • add extension points: org.eclipse.equinox.http.registry.servlet
    • class: de.dailab.acs.attack.gui.web.ServletMain
    • alias: /main

Now start the plugin and open http://localhost:8888/main

Eclipse html

Headline

Jax-RS


Navigation