Hi all,
I’m attempting to embed the Addressbook example: https://vaadin.com/tutorial for Vaadin 7 onto another page (addressbook.html) which is served up by the same servlet.
All I’ve done is create a new HTML page called addressbook.html
<!DOCTYPE html>
<!-- See https://vaadin.com/book/-/page/advanced.embedding.html -->
<html>
<head>
<title>Vaadin Addressbook Embed (Same Origin)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=9;chrome=1" />
<!-- Set up the favicon from the Vaadin theme -->
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="/VAADIN/themes/reindeer/favicon.ico" />
<link rel="icon" type="image/vnd.microsoft.icon" href="/VAADIN/themes/reindeer/favicon.ico" />
</head>
<body>
<!-- Bootstrap Vaadin -->
<script type="text/javascript" src="VAADIN/vaadinBootstrap.js"></script>
<!-- Invisible GWT History Frame -->
<iframe tabindex="-1" id="__gwt_historyFrame" style="position: absolute; width: 0; height: 0; border: 0; overflow: hidden" src="javascript:false"></iframe>
<h1>Vaadin Addressbook Embed (Same Origin)</h1>
<p>Example of embedding a UI in a webpage.</p>
<!--The embedding -->
<div style="width: 300px; border: 2px solid green;" id="addressbook" class="v-app">
<div class="v-app-loading"></div>
<noscript>You have to enable javascript in your browser to use an application built with Vaadin.</noscript>
</div>
<script type="text/javascript">//<![CDATA[
if (!window.vaadin) {
alert("Failed to load the bootstrap JavaScript: VAADIN/vaadinBootstrap.js");
}
/* The UI Configuration */
vaadin.initApplication("addressbook", {
"browserDetailsUrl": "addressbook/",
"serviceUrl": "addressbook/",
"widgetset": "com.vaadin.DefaultWidgetSet",
"theme": "reindeer",
"versionInfo": {"vaadinVersion": "7.0.0"},
"vaadinDir": "VAADIN/",
"heartbeatInterval": 300,
"debug": true,
"standalone": false,
"authErrMsg": {
"message": "Take note of any unsaved data and <u>click here<\/u> to continue.",
"caption": "Authentication problem"
},
"comErrMsg": {
"message": "Take note of any unsaved data and <u>click here<\/u> to continue.",
"caption": "Communication problem"
},
"sessExpMsg": {
"message": "Take note of any unsaved data and <u>click here<\/u> to continue.",
"caption": "Session Expired"
}
}); //]] >
</script>
</body>
</html>
And I’ve placed this within the src/main/webapp directory of the project.
I built the project (
mvn clean package
) and then ran it using jetty (
mvn jetty:run
). However when I navigate to http://localhost:8080/addressbook.html it appears not to show the addressbook.html page, but rather the one generated by Vaadin.
Can anyone explain how to get the application to show my own html page please?