How to use ApplicationServlet to inject JQuery?

I’m trying to inject JQuery into a Vaadin app in order tu use it to modify the UI. However, I do not understand how or when to use the ApplicationServlet to inject the JQuery import into the HTML.

I’ve been looking at the following example:

Should I replace my Application extending class with this one? Or should the Application class call this?

This solution worked for me:
http://stackoverflow.com/questions/9303534/is-is-possible-to-use-jquery-inside-of-vaadin-framework
using
http://code.jquery.com/jquery-1.8.0.min.js
as the src-attribute value.