Documentation versions (currently viewingVaadin 23)

You are viewing documentation for Vaadin 23. View latest documentation

Configuration Properties

Vaadin applications have configuration properties that change their behavior.

Vaadin applications have configuration properties that change their behavior. Use either system properties or servlet initialization parameters to set them. See the full list of properties.

For Spring-based applications, there are Spring-specific instructions available.

Using System Properties

When using Java’s system properties to set the Vaadin application parameters, the vaadin. prefix needs to be specified before the parameter names. The following is an example of how to set a system property when executing a Maven goal from the command-line:

mvn jetty:run -Dvaadin.frontend.url.es6= -Dvaadin.frontend.url.es5=

System properties can be configured for Maven plugin executions. For instance, the following sets a Vaadin-specific system property when the Jetty Maven plugin is run:


Using Servlet Initialization Parameters

Another option is to use servlet initialization parameters. You can use the Servlet 3.0 @WebServlet annotation, which requires you to configure your own servlet. Otherwise, it’s done automatically by Vaadin with default parameter values.

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

Yet another approach is to use the web.xml file like so:

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




System properties override servlet parameters
When a system property and a servlet parameter have the same name, the system property is used.

Configuration Properties

The following list contains the properties that are defined in the com.vaadin.server.DeploymentConfiguration and com.vaadin.server.Constants classes, in alphabetical order.

Spring Boot
If you use Spring Boot, you should add the vaadin. prefix, for example, vaadin.productionMode=true.

Property name


Default value


Checks whether pre-compressed Brotli files should be used if available.



When set to true, the Vaadin session is closed if no UI is active. A UI is active if it is open on the client-side and has some activity in addition to heartbeat requests. By default, heartbeat requests cause the Vaadin session to stay open even if there is no user interaction. If closeIdleSessions is true, the Vaadin session closes without user interaction.



If you are using a server-side live reload tool, the browser is automatically refreshed after the code is reloaded on the server.



By default in development mode, all front-end resources found in the classpath are included in the generated bundle. When set to true, this creates an optimized bundle by including only front-end resources that are used from the application entry points. It uses bytecode scanning, which increases application start-up time.

false for development mode, true for production mode


When session serialization is disabled, UI instances and registered StreamResource instances are not serialized or deserialized when restarting the development server. Enabling the property allows, for example, access control information to be preserved during development, so that you don’t need to log in again for each individual change.



Enables Vaadin to collect usage statistics that are used to guide development further. Statistics are collected based on features used in the application. No data is collected in production mode. Some versions of Vaadin also collect usage statistics through the web browser. See the documentation for the client-side collector for information on how to opt out of that part of the usage statistics collection. Only used in development mode.



Configuration name for the parameter that determines whether Vaadin should automatically register servlets that are required for the application to work.



Cross-site request forgery protection. The protection is enabled by default, but you may want to disable it for a certain type of testing. The check can be disabled by setting the init parameter.



If the client-side bootstrap page should include the initial UIDL fragment.



UIs that are open on the client-side send a regular heartbeat to the server indicating that they are still alive, even when there is no ongoing user interaction. When the server doesn’t receive a valid heartbeat from a given UI within a certain amount of time, it removes that UI from the session. The interval is expressed in seconds.

300 seconds (this equals 5 minutes)


I18N provider property. To use localization and translation strings, the application only needs to implement I18NProvider and define the fully qualified class name in the property i18n.provider. See the Localization documentation for more details.



In certain cases, for example, when the server sends adjacent XmlHttpRequest responses and pushes messages over a low-bandwidth connection, the messages may be received out of sequence by the client. This property specifies the maximum time in milliseconds that the client waits for predecessors of a received out-of-sequence message before considering them missing. It then requests a full resynchronization of the application state from the server. You may increase this if your application experiences an undue quantity of resynchronization requests. However, that degrades the UX due to flickering and loss of client-side-only states, such as scroll position.

5000 ms


This flag can be used to enable pnpm instead of npm to resolve and download front-end dependencies. By default, this flag is set to false, and npm is used. Setting it to true enables pnpm. See how to switch between npm and pnpm.



Sets the application to work in production mode. Production mode disables most of the logged information that appears on the console. Otherwise, logging and other debugging features can have a significant impact on performance. Development-mode JavaScript functions aren’t exported. A push is given as a minified JavaScript file instead of a full-size one, and static resources are cached. See Deploying to Production for more information.



Specifies how long it accepts responses after each network request in milliseconds when using the long polling transport strategy.

-1 (no timeout)


The permitted values are "disabled", "manual" or "automatic". See Server Push for more information.



Sets the servlet mapping used for bidirectional ("push") client-server communication.



If set to true, the server includes some basic timing information in each response. This can be used for performance testing.

true for development mode, false for production mode


Enables or disables sending URLs as GET and POST parameters in requests with content-type application/x-www-form-urlencoded.



Enables or disables sync ID checking. The sync ID is used to handle situations where the client sends a message to a connector that has been removed from the server.



This flag can be used to enable the server-side bootstrapping mode used in Vaadin 14 and earlier versions. This option is only supported if webpack is used as the front-end build tool instead of Vite, which is used by default. You can enable webpack using its associated feature flag.

false (mode removed in v24)


Defines the number of seconds that a WebComponent waits for a reconnect before removing the server-side component from memory.

300 seconds