Vaadin 8 web.xml context-param access

We are trying to uplift our app from Vaadin 7 to Vaadin 8 and having issues accessing hte web.xml context-params

For instance in web.xml we have


Which we used to access via

url = VaadinServlet.getCurrent().getServletContext().getInitParameter(HOST_ADDRESS_PARAM_NAME) + requestUrl;

Under Vaadin 7 this worked perfectly, under 8 we just get a java.lang.NullPointerException

Any suggestions on what’s changed as i cant see any documentation around this either as in how it should be done or that it has chanegd


today i have found this solution for Vaadin 8

this.getSession().getService().getDeploymentConfiguration().getApplicationOrSystemProperty("MY_CONTEXT_PARAM_NAME", "MY_DEFAULT_VALUE");