Search code examples
javajavascriptservletseclipse-rapservlet-container

How is client-side rendering done in Eclipse RAP?


I read about Eclipse RAP and understood what a "servlet container" is: some kind of a java applet on a server instead of a client.

I don't understand how RAP applications are rendered on browsers... are they pure Javascript, HTML5, Java applets, or what?


Solution

  • From the Eclipse RAP wiki:

    The RAP project aims to enable developers to build rich, Ajax-enabled Web applications by using the Eclipse development model, plug-ins and a Java-only API.

    So you write your code in Java, and the client UI is rendered using AJAX (read: Javascript.)

    This implies XMLHttpRequest is used to update the client interface. Some research indicates that RAP uses a legacy version of the Qooxdoo js library, and they don't plan on upgrading because they want to maintain a lightweight client.

    The developer has control over HTML / CSS content.

    Also, the servlet container is a dispatcher that handles URL requests and interacts with your servlets. It's responsible for "managing the life-cycle of servlets, mapping a URL to a particular servlet, and ensuring that the URL requester has the correct access rights." [ 1, 2 ]