[example] Initialise application context on startup
[example] Refactor servlet