Back

Application Filesystem: WebApp


The servicePlan/webApp directory represents the root for the web application.

This directory is available to the application using the recommended JavaScript API function services.file.webAppRootFilePath(). Accessing the directory using this function makes your application more portable, for example when deploying from the Studio. It is also available at /home/servicePlan/webApp.

Files in this directory are available to end-users. For example, an image myImage.png could be added to this directory and it would be available to the internet on https://www.myDomain.com/myImage.png.

This directory is equivalent to the Userdata/apps/ebase/webapp directory of On-Premises environments.

Customisable Error Pages

The WebApp directory contains HTML error pages that are displayed when the user encounters issues, for example, when they request a Form that does not exist. These can be customised to meet your requirements.

Robots

A robots.txt file is added to every new Service Plan. This file can be used to limit bots that attempt to index your application.

We recommend disallowing Yandex bots from indexing your application as they result in high numbers of concurrent connections to the site over a prolonged period and can be disruptive. The robots.txt file included with a Service Plan disallows these bots.

CSS

This directory contains the CSS files used in the HTML error pages.

generatedFiles

Uploaded files could be moved to this directory to make them publicly available.

This directory is available to the application at services.file.webAppRootFilePath()/generatedFiles.

generatedPDFs

Generated PDFs could be moved to this directory to make them publicly available.

This directory is available to the application at services.file.webAppRootFilePath()/generatedPDFs.

images

This directory contains images used in the HTML error pages.

Static images can be added to this directory, although we would recommend that web resources of this type are added to the webResources directory.

Images added to this directory are available to users at https://www.myDomain.com/images/myImage.png, for example.

WEB-INF

This directory contains the web.xml file. A variety of customisations can be made by editing this file directly, such as CORS and HSTS configuration, as well as altering the location of default error pages. Edit this file with care as syntax and other errors can prevent the Service Plan from starting up.

The WEB-INF/lib directory is where Java library files (JAR files) can be added. These server-side libraries usually extend the core functionality of the Service Plan and can then be used by your application. Note that database drivers are not usually placed in this directory – see configuring additional databases for more information.

Additional Java classes and properties files can be added to the WEB-INF/classes directory.

The Service Plan needs to be restarted before any new or customised features become available.

Please note that any added or customised features cannot be supported by our Support Helpdesk.