Deploying Vaadin war file twice

I would like to deploy the same application twice in tomcat. My Vaadin application is configured from a property file and I want to use a different property file for each deployed instance. I am using tomcat 8.

  1. What is the recommended method to deploy the same war file twice?

  2. Currently the property file is hard-coded and used in here:


@WebServlet(value = “/*”, asyncSupported = true)
@VaadinServletConfiguration(productionMode = true, heartbeatInterval = 60, closeIdleSessions = true, ui = XXXDashboard.class)
public static class Servlet extends VaadinServlet {
@Override
protected void servletInitialized() throws ServletException {
super.servletInitialized();
getService().addSessionInitListener(new ValoThemeSessionInitListener());
String configurationFile = System.getProperty(“XXXconfigurationFile”);
Config.init(configurationFile);
}
}

Is this the correct way of doing this? And if so, what is the recommended method to select a different configuration file?

Thank you all for your help!