The /apps/[service-name.webservice]/webservice.properties file specifies service-specific properties in the Java properties file format.
The following general properties are supported:
classpaths | a semicolon-delimited (";") list of Java classpaths to consider, when loading Java classes within the "staticjava" web calls adapter; default: /apps/[service-name.webservice]/bin |
service_type | the service type; the same as the name of the webAppOS service adapter to use for attaching this service (see Service Adapters) default: javaservlet or webroot (the "webroot" adapter is a variant of the "javaservlet" adapter, which also serves files from the /apps/[service-name.webservice]/web-root directory) |
service_displayed_name | app name to be displayed to end users default: simple service directory name without the .webservice extension |
service_url_name | service url to be appended to [domain_or_ip]/services/ to access the current web service (or at least some info about that service) default: lower-cased service directory name without the .webservice extension and without all blank characters |
requires_root_url_paths | true|false, whether the service requires root URL paths, i.e., it is not able to serve paths relative to /services/[service_url_name]; if true, webAppOS will either create a subdomain for this service (if domain_or_ip in webappos.properties points to a domain), or reserves a separate HTTP and (if secure=true in webappos.properties) HTTPS ports that can accept paths without the "/services/[service_url_name]" prefix; default: false |
requires_additional_ports | a string contatining a comma-separated list of integers denoting the preferred additional ports, which are required by the service to operate; among particular port numbers, the list can contain also the "free_port" placeholder to denote a port number assinged by webAppOS (the free_port is increased automatically); default: empty string Example 1: the value for the POP/SMTP mail service could be "25,587" Example 2: the value for the FTP service could be "20,21,free_port,free_port" (two standard ports and two additional ports for passive transfer) |
mimes | a semicolon(";")-delimited list of strings in the form of name:value, where name is an extension (including the dot, e.g., ".lua") or a directory name relative to the home folder (including the starting "/", e.g., "/Desktop"), while value is the mime-type, e.g., "source/lua" or "directory/desktop"; mime values are used when searching for icons |
(scalable) | whether the state of the service will be consistent, if multiple server instances are launched with the same settings (service.properties) and the users connect to these instances randomly; if false, webAppOS will run this service only on one server instance for all users; default: true |
requires | a comma-delimited list of dependencies; the list must contain the names of all directly required web apps, services, or libraries (with the .webapp, .webservice, or .weblibrary extension) that have to be present for this service to operate; indirect dependencies will be collected recursively and put into the all_required and all_required_web_libraries attributes of the corresponding org.webappos.properties.WebServiceProperties Java object default: empty |
For some properties the following placeholders can be used. They will be automatically substituted by actual runtime values:
$WEBAPPOS_ROOT | the directory, where webAppOS is located, e.g., /some/path/webAppOS/dist |
Web services can introduce additional service-specific propertis and service adapters can introduce properties specific for all services of the same type.
Refer to the documentation of the particular service for service-specific properties.
Refer to the documentation of the particular service adapter for service-type-specific properties. Below we provide the list of service-type-specific properties for some out-of-the-box web service adapters.
The following properties can be specified for services implemented as Java servlets (via the "javaservlet" adapter):
servlet_class | a Java class name implementing the servlet, a subclass of javax.servlet.http.HttpServlet; must be specified; default: none; an exception will be thrown by an adapter, if not specified |
http_auth_required | whether the servlet requires HTTP authentication; the webAppOS login+password will be checked by webAppOS before calling the servlet class; default: false |
auth_path_prefix | a prefix that should be prepended before the URL path; the prefix can contain the $LOGIN placeholder, which will be replaced by the webAppOS login name after successful HTTP authentication; |
auth_path_postfix | similar to prefix, but the value is appended to the URL path; |
auth_query_string | similar to prefix, but the value is appended to the URL query; |
The following properties can be specified for services implemented as Virtual Machines (via the "vm" adapter).
vm_system | system architecture according to the QEmu conventions, e.g., "i386" or "x86_64"; default: i386 |
vm_memory | RAM for the VM default: 512 |
vm_disk | the disk image file name relative to /apps/[service-name.service] default: disk.vdi |
vm_ports | the comma-delimited list of ports provided by the VM; ports from requires_additional_ports will be forwarded to vm_ports |
vm_graphics | whether to display the VM window (e.g., for debug purposes); default: false |
In certain cases, the following values of the general properties should be specified for vm-services:
requires_additional_ports=free_port
requires_root_url_paths=true