//we will not check to see if facet is installed.
// check to see if this resource is a JSF page (currently always true) and then,
//if servlet is present, we will change the url based on first mapping found
IModelProvider provider = ModelProviderManager.getModelProvider(resource.getProject());
Object webAppObj = provider.getModelObject();
final JSFUtils jsfUtil = new JSFUtilFactory().create(resource.getProject());
if (webAppObj != null && jsfUtil != null){
//methods below returning the path are identical except for the APIs required
return jsfUtil.getFileUrlPath(webAppObj, resource, existingURL);
}
return null;
}