private void createServletAndModifyWebXML(final IProject project,
final IDataModel config, final IProgressMonitor monitor,
final JSFUtils jsfUtil)
{
final IModelProvider provider = jsfUtil.getModelProvider();
final IPath webXMLPath = new Path("WEB-INF").append("web.xml"); //$NON-NLS-1$ //$NON-NLS-2$
if (jsfUtil.isJavaEE(provider.getModelObject()))
{
provider.modify(new UpdateWebXMLForJavaEE(project, config, jsfUtil),
doesDDFileExist(project, webXMLPath) ? webXMLPath
: IModelProvider.FORCESAVE);
} else
{// must be 2.3 or 2.4
provider.modify(new UpdateWebXMLForJ2EE(project, config, jsfUtil),
webXMLPath);
}
// TODO: is the MyFaces check a todo?
// Check if runtime is MyFaces or Sun-RI
}