Embedding Vaadin app with JSP in <div>

I have already tried embedding my app as an iframe and it worked fine, excluding the sizing problems.

I am currently trying to embed the application as

but thus far Ive had no success.

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script type="text/javascript">
            var vaadin = {
                vaadinConfigurations: {

                    'calc' :{
                        appUri:'/WebApplication2/',
                        pathInfo: '/',
                        themeUri: '/VAADIN/themes/example',
                        versionInfo : {vaadinVersion:"6-INTERNAL-NONVERSIONED-DEBUG-BUILD",applicationVersion:"NONVERSIONED"}
                    }

                }};
        </script>
        <script language='javascript' src='/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/com.vaadin.terminal.gwt.DefaultWidgetSet.nocache.js'></script>
        <link rel="stylesheet" type="text/css" href="/VAADIN/themes/example/styles.css"/>
    </head>

    <body>
        <iframe id="__gwt_historyFrame" style="width:0;height:0;border:0;overflow:hidden" src="javascript:false"></iframe>

        <p>Multiple Vaadin applications per html file test page</p>
         <div id="calc" style="border:2px solid green;margin:0"></div>
       </body>
</html>
  'calc' :{
                        appUri:'/WebApplication2/',
                        pathInfo: '/',
                        themeUri: '/VAADIN/themes/example',
                        versionInfo : {vaadinVersion:"6-INTERNAL-NONVERSIONED-DEBUG-BUILD",applicationVersion:"NONVERSIONED"}
                    }

This part confuses me the most. Let’s say I deploy my Vaadin application and it has a path “localhost:8080/WebApplication2/”, how do I pass that as an argument for appUri and pathInfo. I have read the passage in the Vaadin book, and have tried many different combinations but nothing is working. Do you have to change something else too in like the deployment descriptor or something?

See here:

http://vaadin.com/forum/-/message_boards/view_message/704304

André