Tuesday, 18 March 2014

Vaadin & Google App Engine

Deploying your first Vaadin Application to Google App Engine.

This blog demonstrates what you will need to deploy your Vaadin application to Google App Engine. In this exercise, I use eclipse kepler.

Prerequisites: Please ensure you got the following plugins installed:
1. Google Update Site for Eclipse 4.3 - http://dl.google.com/eclipse/plugin/4.3
2. Vaadin Update Site for Eclipse - http://vaadin.com/eclipse

Go to File --> New --> Project --> Vaadin 7 Project

Step 2 - Select the options as shown in the screenshot.

Step 3 - Select the default setting on the next set of screen and complete the creation of the project (Change it if you know what you are doing)

Step 4 - Right click the project just created and select Properties

Step 5 - Look for App Engine under Google

Step 6 - Select 'Use Google App Engine' and put in your 'Application ID' and 'Version'

Step 7 - Create a web.xml under war/WEB-INF

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    id="WebApp_ID" version="3.0">
        <description>Vaadin production mode</description>
            <description>Vaadin UI</description>

 Step 8 - Go to Java Build Path -> Order and Export tab and change the order to look like as shown in the screenshot

Step 9 - Make sure that the appengine-web.xml contains the "<threadsafe>true</threadsafe>"

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <!-- Configure java.util.logging -->
        <property name="java.util.logging.config.file" value="WEB-INF/logging.properties" />

Step 10 - Make sure that war/WEB-INF/lib has got the following JARs

Step 11 - Right click, Google - > 'Deploy  to App Engine' -> Deploy