Getting communication error with <div> style embedding.

Hi,
We are trying to breathe new life into a legacy application, that consists of a mishmash of technologies including struts1.0 springmvc, ejb2.0 etc. The plan is facelifting the UI by using Vaadin.
It has to be a gradual and phased conversion and so we are trying to embed Vaadin UIs into existing JSP pages. I have followed the guide at:
https://vaadin.com/book/vaadin7/-/page/advanced.embedding.html

I am trying the simple UI, that is coming along with vaadin maven archetype. The one having the “click me” button and it replies by adding “Thank you for clicking” lines. I am so far able to embed the UI into one of our JSPs with varying success.
The problem I have is that it works well with the