Changing Flow behavior with runtime configuration.

Flow application have extra parameters that may be set to change its behavior.

How to set parameters

Parameters can be set the following way:

  • by setting the system property

In this case, vaadin. prefix is needed to be specified before the parameter names. For instance, Spring Boot can be configured in file. For more details, refer to Flow Spring configuration

Alternatively, system properties can be set via command line:

mvn jetty:run -Dvaadin.frontend.url.es6= -Dvaadin.frontend.url.es5=
  • by setting the servlet init parameters

You can use the traditional web.xml file or the Servlet 3.0 @WebServlet annotation:

@WebServlet(urlPatterns = "/*", name = "myservlet", asyncSupported = true, initParams = {
        @WebInitParam(name = "frontend.url.es6", value = ""),
        @WebInitParam(name = "frontend.url.es5", value = "") })
@VaadinServletConfiguration(productionMode = false)
public class MyServlet extends VaadinServlet {

Or when using the web.xml file:

<?xml version="1.0" encoding="UTF-8"?>
  id="WebApp_ID" version="3.0"




System properties override application properties ergo if you have both properties with the same name specified, the system one will be used.

Parameters and description

  • disable.webjars - if set to true, webjars would be ignored during request resolving, allowing Flow to use external source of web components' files.

    Webjars are enabled for development mode and disabled for production mode by default, unless explicitly overridden by parameter specified. In the future, webjars are expected to the always enabled by default.

Next group of parameters are paths to external web component’s locations in development and production modes.

Development mode:

  • (default value is context://frontend) – a location Flow searches web components' files in development mode. Supports changes reload on a working application and should be set as a directory, containing bower.json file.

Production mode:

  • productionMode (default value is false) – turns application to work in production mode

  • frontend.url.es5 (default value is context://frontend-es5) - a location Flow searches web components' files in production mode when the request is coming from older browsers, not supporting es6, default web components' development language version.

  • frontend.url.es6 (default value is context://frontend-es6) - a location Flow searches web components' files in production mode for requests from modern browsers

  • load.es5.adapters (default value is true) – include polyfills for browsers that does not support ES6 to their initial page. In order for web components to work, extra libraries (polyfills) are required to be loaded, can be turned off if different versions or libraries should be included instead.