Embedding a Vaadin application in a static html page

Hi there,

I am just trying to embedd a Vaadin application in a static html page with the help of the current Vaadin docs (https://vaadin.com/docs/-/part/framework/advanced/advanced-embedding.html). I have a “Hello World” app with a button that shows a notification when clicked.

I have a mapping to serve static resources in my web application:

<servlet-mapping>
        <servlet-name>default</servlet-name>
        <url-pattern>/static/*</url-pattern>
</servlet-mapping>

and a mapping for the vaadin app:

<servlet-mapping> <servlet-name>Vaadin</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> The code of the static html page is:

[code]

<?xml version="1.0" encoding="UTF-8" ?> Embedding a Vaadin Application in HTML Page

Embedding a Vaadin UI

This is a static web page that contains an embedded Vaadin application. It's here:

<!-- Optional placeholder for the loading indicator -->
<div class=" v-app-loading"></div>

<!-- Alternative fallback text -->
<noscript>You have to enable javascript in your browser to
          use an application built with Vaadin.</noscript>

Please view the page source to see how embedding works.

[/code]The application works fine on the URI http://localhost:8080/masterportlet/. The static HTML page is shown at the url http://localhost:8080/masterportlet/static/index.html . The embedding however does not work as desired. I can see that the vaadin servlet is invoked (Vaadin is running in DEBUG MODE), but the app is not embedded and I get the javascript error: Thu Feb 04 15:10:40 GMT+100 2016 com.vaadin.client.ApplicationConfiguration SEVERE: (TypeError) : d is nullcom.google.gwt.core.client.JavaScriptException: (TypeError) : d is null at Unknown.hdd(http://localhost:8080/masterportlet/static/index.html) at Unknown.lzb(http://localhost:8080/masterportlet/static/index.html) at Unknown.Kyb(http://localhost:8080/masterportlet/static/index.html) at Unknown.Ti(http://localhost:8080/masterportlet/static/index.html) at Unknown.Li(http://localhost:8080/masterportlet/static/index.html) at Unknown.Xi(http://localhost:8080/masterportlet/static/index.html) at Unknown.Ri(http://localhost:8080/masterportlet/static/index.html) at Unknown.oi(http://localhost:8080/masterportlet/static/index.html) at Unknown.ri(http://localhost:8080/masterportlet/static/index.html) at Unknown.qi/<(http://localhost:8080/masterportlet/static/index.html) at Unknown.d(http://localhost:8080/masterportlet/static/index.html) at Unknown.anonymous(Unknown)

Can somebody help me with that or just post a working example for embedding an app in a static page?

30 minutes after posting this topic I found the error:
The ID of the

where the app is embedded
must
be identical to the one used in initApplication()

vaadin.initApplication("
masterportlet
" …