reading config parameter from web.xml


I am new to vaadin (and web programming in general), and am looking for a way to read a configured path from a config file. Searching on the internet seems to suggest the way to do this is use web.xml and store the parameter as an , however my application doesn’t seem to get the correct value

I am using the following entry in the web.xml:




In the vaadin server application I have tried the following approaches:

DeploymentConfiguration conf = getSession().getConfiguration();
String configFilePath = conf.getApplicationOrSystemProperty(“configFilePath”, “default/path/of/File.xml”);

This always gives me the default, instead of the value in the xml that I am looking for.

  1.         String configFilePath = VaadinServlet.getCurrent().getInitParameter("configFilePath");

I get null for this.

Can anyone help with this?


in my project i read from my web.xml like this:

String example = VaadinServlet.getCurrent().getServletContext().getInitParameter("example"); web.xml:


Thanks a ton. That fixed the problem.