if (webXmlUrl != null) {
final VirtualFile root = model.getSourceRoots()[0];
webFacet.addWebRoot(root, "/");
final ConfigFileInfoSet descriptors = webFacet.getDescriptorsContainer().getConfiguration();
descriptors.addConfigFile(DeploymentDescriptorsConstants.WEB_XML_META_DATA, webXmlUrl);
for (String url : ModuleRootManager.getInstance(module).getSourceRootUrls()) {
webFacet.addWebSourceRoot(url);
}
}