Inline Javascript in the HEAD tag

Very new to Vaadin, so forgive me if this is easily done. I am looking for a way to inject inline javascript immediately after the meta tags and before any other SCRIPT tag is called in Vaadin 7. Can someone explain to me how this is accomplished and/or provide an example? The javascript cannot be referenced by file.

Thank you.

You can do this with BootStrapListener, see this another question for example how to set the listener

There is more information about the topic here:

This suggestion worked almost perfectly, thank you. The next hurdle is that some characters in the script are being converted to URL encoded, specifically ‘<’, ‘>’ and ‘&’ which is causing syntax errors in the console. Is there a way to prevent encoding?