Referencing JavaScript with @JavaScript annotation

In Vaadin 7, how do I reference a JavaScript file using @JavaScript annotation? I have @com.vaadin.annotations.JavaScript("tawkToWebChat.js") in my UI code, which puts <script type="text/javascript" src="./APP/PUBLISHED/tawkToWebChat.js"></script> in the <head> section, and I put the JavaScript file in resources\com\mobiwms\website, since my UI class is in the package. Is that the correct place to put the JavaScript?

Also, my tool really needs to be added at the end of the <body> section - how would I do that?

My only goal is to add a plugin to my website, which will be a webChat customers can use to talk to our support staff. Sometimes such plugins need to be added to <head>, other times to <body>, just need to know how to do both, and thought @JavaScript annotation would be the way to do it.

As per [this blog post]
(, I even tried copying the script to the same exact package as my Java file.

Using, I can see processing.js in the sources when I “inspect” the code in Chrome, and it is under APP/PUBLISHED. But for my application, the JavaScript is not in the sources anyplace.

processing.js code reference:

![processing js code ref]

My application, note no reference to the JavaScript at all: