Launching RAP Applications

To start your RAP application, select Open Run Dialog... from the Run menu. You need to create a New Launch configuration. You can either use the RAP Launcher or the Equinox Launcher.

Required plug-ins

Regardless which way to launch you choose ensure that the following plug-ins are activated:

web.xml

Currently it is not possible to specify a web.xml to be used by the servlet engine. Some of the settings that usually would be specified in the web.xml, can be passed to the Equinox HTTP Service via system properties.

Servlet engine log

By default the servlet engine (namely Jetty) is configured to suppress most logging information. This can be changed by adding the VM argument -Dorg.eclipse.equinox.http.jetty.log.stderr.threshold=<log level> to the launch configuration. Valid log levels are debug, info, warn, error, and off. The default value is warn.

Using the RAP Launcher

The RAP Launcher is based on the OSGi Launcher and adds a Main tab page to it. Please note, that the RAP Launcher only works when the Equinox OSGi Framework is selected, which is the default setting on page Bundles.

Servlet and Entry Point/Application to Run

Within this group you need to choose the combination of servlet name and entry point/application you would like to run.

Please note that the selection dialog opens when the Browse... button was pressed. The dialog lists all servlet names and entry points/applications available in the workspace. Open the drop down menu item in the top right corner and select Include Target Platform if you want to see the servlet names and entry points/applications available in your workspace and target. The RAP Launcher will display an error in case the selected servlet name, entry point or application is not contained in the selection on the Bundles page.

When the Terminate possible running previous launch option is selected, an eventually running launch with the same name will be terminated before lauching. This might come in handy when frequently changing code and restarting the application.

Browser

Controls whether the application should be opened with the internal browser in the editor area or with an external browser or if no browser should be opened. The outcome depends on the browser preference settings that can be reached with the Configure Browsers... link.

Manual Port Configuration

It is recommended to let the launcher dynamically choose a free port for client-server communication. However if you would like to have full control over the communication channel, you can explicitly specify a port number.

Session Timeout

Specifies the servlet session timeout in seconds. If the checkbox is unselected, the session will never expire.

Context Path

A web application can be deployed with a context path. After deployment the web application will be accessible using this path e.g. http://server:port/contextPath/webapp. To simulate this during development time you can use the option to specify a context path within the Main tab.

Client-side Log Level

No longer supported since RAP 1.4. It can be used with prior versions of RAP.
This setting controls to which extent log messages from the client-side JavaScript library are written. All settings other than Off may open a browser pop-up window.

Client-side Library Variant

RAP comes with two flavors of qooxdoo, the client-side JavaScript library. The Standard version is optimized for speed and size, whereas the Debug version should be used when developing with RAP, especially custom widgets.

Instance Area

The instance area location sets the Program Arguments to define the osgi.instance.area. Bundles use this location to store their state location data.

To launch a once created launch configuration you may use the launch shortcut keys Alt+Shift+X+R (run) and Alt+Shift+D+R (debug).

Using the Equinox Launcher

To run the demo, select Run > Run... from the main menu. In the upcoming Launch Configuration Dialog, select Rich Ajax Platform Demo from the section Equinox OSGi Framework.

You may want to configure the TCP-port your demo application will listen to. This is done opening the Arguments page and changing the -Dorg.osgi.service.http.port=9090 VM argument, to a (arbitrarily chosen) port your application will listen to. This is particularly important if the default port 9090 is already taken by some other application.

To actually start your application, click the Run button. The correct startup should display in the Eclipse Console through a message saying INFO: Started SocketListener on 0.0.0.0:<port>. If an error shows up, please make sure all other instances are stopped and then retry with another port.

Now that the RAP application is running, you can access it using any browser. Please enter the URL http://localhost:<port>/rap?startup=<entrypoint>. Where <entrypoint> specifies the name of the IEntryPoint implementation that you would like to start.