Skip to content
Snippets Groups Projects
openbis-webapps.md 23.59 KiB

openBIS webapps

Introduction

Webapps are HTML5 apps that interact with openBIS. Webapps can be distributed as core-plugins. To supply a webapp plugin, create a folder called webapps in the as. Each subfolder of the webapps folder is treated as a webapp plugin. A webapp plugin requires two things, a plugin.properties file, as with all plugins, and a folder containing the content of the webapp. This folder can have any name and needs to be referenced in the plugin.properties file with the key webapp-folder.

It is recommended to name the webapp folder html as done in the examples below. This has the advantage that an existing subfolder named etc will not be changed after an upgrade of the plugin. That is, the content of the folder html/etc will be completely untouched by upgrades. This feature allows to provide an initial configuration (say in html/etc/config.js) with some default settings which can be overridden by the customer.

The webapp is then served by the same web server (jetty) that serves openBIS. The name of the webapp defines the URL used to access it. See the example below. The file index.html is used as a welcome page if the user does not specifically request a particular page.

An openBIS webapp is not a J2EE webapp. It has more in common with an app for mobile devices.

 

Example

This is an example of a webapp. In a real webapp, the name of the webapp can be any valid folder name. The same goes for the folder in the webapp containing the the code. The name of the webapp folder is what is used to define the URL. The name of the folder containing the code is neither shown nor available to the user.

Directory Structure

  • [module]
    • [version]
      • as
        • webapps
          • example-webapp
            • plugin.properties
            • html
              • index.html
          • fun-viewer
            • plugin.properties
            • html
              • code
              • index.html

plugin.properties

# The properties file for an example webapps plugin
# This file has no properties defined because none need to be defined.
webapp-folder = html

URL

If openBIS is served at the URL https://my.domain.com:8443/openbis, the above webapps will be available under the following URLs:

Server Configuration

There are two things to consider in the server configuration. The injection of webapps is done through Jetty, which is the web server we use for openBIS. If you use the default provided jetty.xml configuration, then you do not need to do anything extra; if, on the other hand, you have a custom jetty.xml configuration, then you will need to update your jetty.xml file to support webapps. 

 

Jetty Configuration