[412143] [hotbug_request]Remove jst.web facet dependency from jst.jaxrs
facet 
diff --git a/bundles/org.eclipse.jst.ws.jaxrs.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.jaxrs.core/META-INF/MANIFEST.MF
index f80823d..425c4c6 100644
--- a/bundles/org.eclipse.jst.ws.jaxrs.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.ws.jaxrs.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %plugin.name
 Bundle-SymbolicName: org.eclipse.jst.ws.jaxrs.core;singleton:=true
-Bundle-Version: 1.0.500.qualifier
+Bundle-Version: 1.0.501.qualifier
 Bundle-Activator: org.eclipse.jst.ws.jaxrs.core.internal.JAXRSCorePlugin
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.100,4.0.0)",
diff --git a/bundles/org.eclipse.jst.ws.jaxrs.core/plugin.xml b/bundles/org.eclipse.jst.ws.jaxrs.core/plugin.xml
index 51ff208..f62c25b 100644
--- a/bundles/org.eclipse.jst.ws.jaxrs.core/plugin.xml
+++ b/bundles/org.eclipse.jst.ws.jaxrs.core/plugin.xml
@@ -23,7 +23,7 @@
     <project-facet-version facet="jst.jaxrs" version="1.0">
        <constraint>
         <and>
-          <requires facet="jst.web" version="[2.3"/>
+          <requires facet="jst.web" soft="true" version="[2.3"/>
           <requires
                 facet="jst.java"
                 version="[5.0">
@@ -36,7 +36,7 @@
     <project-facet-version facet="jst.jaxrs" version="1.1">
        <constraint>
         <and>
-          <requires facet="jst.web" version="[2.3"/>
+        <requires facet="jst.web" soft="true" version="[2.3"/>
           <requires
                 facet="jst.java"
                 version="[5.0">
@@ -49,7 +49,7 @@
     <project-facet-version facet="jst.jaxrs" version="2.0">
        <constraint>
         <and>
-          <requires facet="jst.web" version="[3.1"/>
+          <requires facet="jst.web" soft="true" version="[3.1"/>
           <requires
                 facet="jst.java"
                 version="[7.0">
@@ -64,7 +64,7 @@
     <project-facet-version facet="jst.jaxrs" version="2.0">
        <constraint>
         <and>
-          <requires facet="jst.web" version="[3.1"/>
+          <requires facet="jst.web" soft="true" version="[3.1"/>
           <requires
                 facet="jst.java"
                 version="[1.7">
diff --git a/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/Messages.java b/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/Messages.java
index 836f38b..a6582ae 100644
--- a/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/Messages.java
+++ b/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/Messages.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -146,6 +146,11 @@
 	 * see messages.properties
 	 */
 	public static String JAXRSFacetUninstallDelegate_NonUpdateableWebXML;
+	
+	/**
+	 * see messages.properties
+	 */
+	public static String JAXRSFacetUninstallDelegate_ProjectErr;
 
 	static {
 		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/messages.properties b/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/messages.properties
index 43b38ab..40d90c7 100644
--- a/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/messages.properties
+++ b/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2009, 2010 IBM Corporation and others.
+# Copyright (c) 2009, 2013 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -36,6 +36,7 @@
 JAXRSFacetInstallDelegate_NonUpdateableWebXML=JAX-RS Facet was not installed on ''{0}''.  The web.xml file needs to be updateable.
 JAXRSFacetUninstallDelegate_ConfigErr=''{0}'' : unable to de-configure web module for JAX-RS
 JAXRSFacetUninstallDelegate_NonUpdateableWebXML=JAX-RS Facet was not un-installed from ''{0}''.  The web.xml file needs to be updateable.
+JAXRSFacetUninstallDelegate_ProjectErr=''{0}'' : unable to evaluate project for JAX-RS
 
 ArchiveFileImpl_CannotCopyFile=Cannot copy file
 ArchiveFileImpl_CannotCloseFile=Cannot close file
diff --git a/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/project/facet/JAXRSFacetInstallDelegate.java b/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/project/facet/JAXRSFacetInstallDelegate.java
index 132f95c..7cbc509 100644
--- a/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/project/facet/JAXRSFacetInstallDelegate.java
+++ b/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/project/facet/JAXRSFacetInstallDelegate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -92,25 +92,28 @@
 						Messages.JAXRSFacetInstallDelegate_InternalErr);
 			}
 
-			// Before we do any configuration, verify that web.xml is available
-			// for update
-			IModelProvider provider = JAXRSUtils.getModelProvider(project);
-			if (provider == null) {
-				throw new JAXRSFacetException(NLS.bind(
-						Messages.JAXRSFacetInstallDelegate_ConfigErr, project
-								.getName()));
-			} else if (!(provider.validateEdit(null, null).isOK())) {
-				// checks for web.xml file being read-only and allows user to set writeable
-				if (!(provider.validateEdit(null, null).isOK())) {
-					throw new JAXRSFacetException(
-							NLS
-									.bind(
-											Messages.JAXRSFacetInstallDelegate_NonUpdateableWebXML,
-											project.getName())); //$NON-NLS-2$
+			final boolean isDynamicWebProject = JAXRSFacetDelegateUtils.isDynamicWebProject(project);
+
+			if (isDynamicWebProject) {
+				// Before we do any configuration, verify that web.xml is available
+				// for update
+				IModelProvider provider = JAXRSUtils.getModelProvider(project);
+				if (provider == null) {
+					throw new JAXRSFacetException(NLS.bind(
+							Messages.JAXRSFacetInstallDelegate_ConfigErr, project
+									.getName()));
+				} else if (!(provider.validateEdit(null, null).isOK())) {
+					// checks for web.xml file being read-only and allows user to set writeable
+					if (!(provider.validateEdit(null, null).isOK())) {
+						throw new JAXRSFacetException(
+								NLS
+										.bind(
+												Messages.JAXRSFacetInstallDelegate_NonUpdateableWebXML,
+												project.getName())); //$NON-NLS-2$
+					}
 				}
 			}
 
-			
 			if (((LibraryInstallDelegate) config
 					.getProperty(IJAXRSFacetInstallDataModelProperties.LIBRARY_PROVIDER_DELEGATE))
 					.getLibraryProviderOperationConfig() instanceof JAXRSUserLibraryProviderInstallOperationConfig
@@ -151,9 +154,12 @@
 					createSharedLibraries(project, fv, monitor, config);
 			}			
 
-			// Update web model if necessary
-			if (config.getBooleanProperty(IJAXRSFacetInstallDataModelProperties.UPDATEDD))
-				createServletAndModifyWebXML(project, config, monitor);
+			if (isDynamicWebProject) {
+				// Update web model if necessary
+				if (config.getBooleanProperty(IJAXRSFacetInstallDataModelProperties.UPDATEDD))
+					createServletAndModifyWebXML(project, config, monitor);
+			}
+
 			if (monitor != null) {
 				monitor.worked(1);
 			}
diff --git a/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/project/facet/JAXRSFacetUninstallDelegate.java b/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/project/facet/JAXRSFacetUninstallDelegate.java
index dfa679d..573c6a3 100644
--- a/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/project/facet/JAXRSFacetUninstallDelegate.java
+++ b/bundles/org.eclipse.jst.ws.jaxrs.core/src/org/eclipse/jst/ws/jaxrs/core/internal/project/facet/JAXRSFacetUninstallDelegate.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -57,26 +57,33 @@
 			}
 
 			try {
-				// Before we do any de-configuration, verify that web.xml is
-				// available for update
-				IModelProvider provider = JAXRSUtils.getModelProvider(project);
-				if (provider == null) {
-					throw new JAXRSFacetException(NLS.bind(
-							Messages.JAXRSFacetUninstallDelegate_ConfigErr,
-							project.getName()));
-				} else if (!(provider.validateEdit(null, null).isOK())) {
-					throw new JAXRSFacetException(
-							NLS
-									.bind(
-											Messages.JAXRSFacetUninstallDelegate_NonUpdateableWebXML,
-											project.getName()));
+
+				final boolean isDynamicWebProject = JAXRSFacetDelegateUtils.isDynamicWebProject(project);
+
+				if (isDynamicWebProject) {
+					// Before we do any de-configuration, verify that web.xml is
+					// available for update
+					IModelProvider provider = JAXRSUtils.getModelProvider(project);
+					if (provider == null) {
+						throw new JAXRSFacetException(NLS.bind(
+								Messages.JAXRSFacetUninstallDelegate_ConfigErr,
+								project.getName()));
+					} else if (!(provider.validateEdit(null, null).isOK())) {
+						throw new JAXRSFacetException(
+								NLS
+										.bind(
+												Messages.JAXRSFacetUninstallDelegate_NonUpdateableWebXML,
+												project.getName()));
+					}
 				}
 
 				// Remove JAXRS Libraries
 				( (JAXRSFacetUninstallConfig) config ).getLibrariesUninstallDelegate().execute( null );
 
-				// remove servlet stuff from web.xml
-				uninstallJAXRSReferencesFromWebApp(project, monitor);
+				if (isDynamicWebProject) {
+					// remove servlet stuff from web.xml
+					uninstallJAXRSReferencesFromWebApp(project, monitor);
+				}
 
 				if (monitor != null) {
 					monitor.worked(1);
diff --git a/bundles/org.eclipse.jst.ws.jaxrs.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.jaxrs.ui/META-INF/MANIFEST.MF
index 21ddc0e..f522eee 100644
--- a/bundles/org.eclipse.jst.ws.jaxrs.ui/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.ws.jaxrs.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %plugin.name
 Bundle-SymbolicName: org.eclipse.jst.ws.jaxrs.ui;singleton:=true
-Bundle-Version: 1.0.600.qualifier
+Bundle-Version: 1.0.601.qualifier
 Bundle-Activator: org.eclipse.jst.ws.jaxrs.ui.internal.JAXRSUIPlugin
 Bundle-Vendor: %PLUGIN_PROVIDER
 Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/messages.properties b/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/messages.properties
index a987b97..842d30e 100644
--- a/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/messages.properties
+++ b/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/messages.properties
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2009, 2010 IBM Corporation and others.
+# Copyright (c) 2009, 2013 IBM Corporation and others.
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -15,7 +15,7 @@
 # 20100413   307552 ericdp@ca.ibm.com - Eric D. Peters, JAX-RS and Java EE 6 setup is incorrect
 ###############################################################################
 JAXRSFacetInstallPage_title=JAX-RS Capabilities
-JAXRSFacetInstallPage_description=Add JAX-RS capabilities to this Web Project
+JAXRSFacetInstallPage_description=Add JAX-RS capabilities to this Project
 JAXRSFacetInstallPage_JAXRSImplementationLibrariesFrame=JAX-RS &Implementation Library
 JAXRSFacetInstallPage_JAXRSServletLabel=Servlet Information
 JAXRSFacetInstallPage_Add2=&Add...
@@ -35,3 +35,4 @@
 JAXRSLibraryConfigControl_IncludeGroupLabel=Include library with this application
 JAXRSLibraryConfigControl_SharedLibButtonLabel=Shared Library
 JAXRSLibraryConfigControl_TooltipIncludeAsSharedLib=Include as shared library
+
diff --git a/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/project/facet/JAXRSFacetInstallPage.java b/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/project/facet/JAXRSFacetInstallPage.java
index 5edf8c1..e63a0ff 100644
--- a/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/project/facet/JAXRSFacetInstallPage.java
+++ b/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/project/facet/JAXRSFacetInstallPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2012 IBM Corporation and others.
+ * Copyright (c) 2009, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -183,10 +183,11 @@
 				}
 				});
 
+
     servletInfoGroup = new ServletInformationGroup(composite, SWT.NONE);
     servletInfoGroup.setDataModel(model);
    	updateUpdateDDState(librariesInstallDelegate.getLibraryProvider().getId());
-
+   	servletInfoGroup.setVisible(isWebFacetSelected());
     addModificationListeners();
 
     return composite;
@@ -197,7 +198,9 @@
 	boolean nOopLibrary = libraryProviderID.equals(IJAXRSCoreConstants.NO_OP_LIBRARY_ID);
 	if (bUserLibrary || nOopLibrary) {
 		updateDDCheckBox.setVisible(isJEE6orGreater());
-	}  else
+	}  else if (!isWebFacetSelected() ) {
+		updateDDCheckBox.setVisible(false);
+	} else
 		updateDDCheckBox.setVisible(showUpdateDDCheckBox(libraryProviderID));
     if (updateDDCheckBox.getVisible()) {
     		boolean selected;
@@ -212,7 +215,21 @@
 	if (updateDDCheckBox.getVisible())
 		model.setBooleanProperty(IJAXRSFacetInstallDataModelProperties.UPDATEDD, updateDDCheckBox.getSelection());
 	else
-		model.setBooleanProperty(IJAXRSFacetInstallDataModelProperties.UPDATEDD, true);
+		model.setBooleanProperty(IJAXRSFacetInstallDataModelProperties.UPDATEDD, isWebFacetSelected());
+}
+
+@SuppressWarnings("rawtypes")
+private boolean isWebFacetSelected() {
+	Iterator it = this.context.getSelectedProjectFacets().iterator();
+	while (it.hasNext()) {
+		// find Web facet
+		IProjectFacetVersion pfv = (IProjectFacetVersion) it.next();
+		if (pfv.getProjectFacet().getId().equals("jst.web")) { //$NON-NLS-1$
+			return true;
+		}
+	}
+	return false;
+
 }
 
 	@SuppressWarnings("rawtypes")
@@ -302,31 +319,39 @@
         }
       }
     }
+    
 
-    String servletName = null;
-    if (root != null)
-      servletName = root.get(SETTINGS_SERVLET);
-    if (servletName == null || servletName.equals("")) { //$NON-NLS-1$
-      servletName = (String) model.getDefaultProperty(IJAXRSFacetInstallDataModelProperties.SERVLET_NAME);
-    }
-    servletInfoGroup.txtJAXRSServletName.setText(servletName);
+			String servletName = null;
+			if (root != null)
+				servletName = root.get(SETTINGS_SERVLET);
+			if (servletName == null || servletName.equals("")) { //$NON-NLS-1$
+				servletName = (String) model
+						.getDefaultProperty(IJAXRSFacetInstallDataModelProperties.SERVLET_NAME);
+			}
+			servletInfoGroup.txtJAXRSServletName.setText(servletName);
 
-    String servletClassname = null;
-    String libraryProviderID = "";
-	LibraryInstallDelegate librariesInstallDelegate = (LibraryInstallDelegate) getDataModel().getProperty(LIBRARY_PROVIDER_DELEGATE);
-	if (librariesInstallDelegate != null && librariesInstallDelegate.getLibraryProvider() != null)
-		libraryProviderID = librariesInstallDelegate.getLibraryProvider().getId();
-    if (root != null) {
-        servletClassname = root.get(libraryProviderID + SETTINGS_SERVLET_CLASSNAME);
-    }
-    if (servletClassname == null) { 
-      servletClassname = JAXRSLibraryProviderUtil.getServletClassName(libraryProviderID);
-      if (servletClassname == null)
-    	  servletClassname = (String) model.getDefaultProperty(IJAXRSFacetInstallDataModelProperties.SERVLET_CLASSNAME);
-    }
-    servletInfoGroup.txtJAXRSServletClassName.setText(servletClassname);
+			String servletClassname = null;
+			String libraryProviderID = "";
+			LibraryInstallDelegate librariesInstallDelegate = (LibraryInstallDelegate) getDataModel()
+					.getProperty(LIBRARY_PROVIDER_DELEGATE);
+			if (librariesInstallDelegate != null
+					&& librariesInstallDelegate.getLibraryProvider() != null)
+				libraryProviderID = librariesInstallDelegate
+						.getLibraryProvider().getId();
+			if (root != null) {
+				servletClassname = root.get(libraryProviderID
+						+ SETTINGS_SERVLET_CLASSNAME);
+			}
+			if (servletClassname == null) {
+				servletClassname = JAXRSLibraryProviderUtil
+						.getServletClassName(libraryProviderID);
+				if (servletClassname == null)
+					servletClassname = (String) model
+							.getDefaultProperty(IJAXRSFacetInstallDataModelProperties.SERVLET_CLASSNAME);
+			}
+			servletInfoGroup.txtJAXRSServletClassName.setText(servletClassname);
 
-    loadURLMappingPatterns(root);
+			loadURLMappingPatterns(root);
   }
 
   private void saveSettings()
@@ -576,7 +601,7 @@
 						Messages.JAXRSFacetInstallPage_ErrorNoWebAppDataModel,
 						e);
 			}
-		}
+		} 
 	}
 
   /*
diff --git a/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/project/facet/JAXRSLibraryPropertyPage.java b/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/project/facet/JAXRSLibraryPropertyPage.java
index 3e2bfd9..2c67096 100644
--- a/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/project/facet/JAXRSLibraryPropertyPage.java
+++ b/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/project/facet/JAXRSLibraryPropertyPage.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2009, 2011 IBM Corporation and others.
+ * Copyright (c) 2009, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -29,6 +29,7 @@
 import java.util.List;
 
 import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -46,11 +47,13 @@
 import org.eclipse.jst.ws.jaxrs.core.internal.IJAXRSCoreConstants;
 import org.eclipse.jst.ws.jaxrs.core.internal.Messages;
 import org.eclipse.jst.ws.jaxrs.core.internal.project.facet.IJAXRSFacetInstallDataModelProperties;
+import org.eclipse.jst.ws.jaxrs.core.internal.project.facet.JAXRSFacetDelegateUtils;
 import org.eclipse.jst.ws.jaxrs.core.internal.project.facet.JAXRSJ2EEUtils;
 import org.eclipse.jst.ws.jaxrs.core.internal.project.facet.JAXRSJEEUtils;
 import org.eclipse.jst.ws.jaxrs.core.internal.project.facet.JAXRSUtils;
 import org.eclipse.jst.ws.jaxrs.ui.internal.IJAXRSUIConstants;
 import org.eclipse.jst.ws.jaxrs.ui.internal.JAXRSUIPlugin;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
@@ -101,24 +104,31 @@
     	}
     }
     this.webXMLPath = new Path("WEB-INF").append("web.xml"); //$NON-NLS-1$ //$NON-NLS-2$
-    this.provider = JAXRSUtils.getModelProvider(getProject());
-    if (provider != null)
-    	this.webAppObj = provider.getModelObject();
-	if (doesDDFileExist(getProject(), this.webXMLPath)) {
-	    servletInfoGroup = new ServletInformationGroup((Composite) c, SWT.NONE);
-			servletInfoGroup.txtJAXRSServletName.addListener(SWT.Modify,
-					new Listener() {
-						public void handleEvent(Event arg0) {
-							updateValidation();
-						}
-					});
-			servletInfoGroup.txtJAXRSServletClassName.addListener(SWT.Modify,
-					new Listener() {
-						public void handleEvent(Event arg0) {
-							updateValidation();
-						}
-					});
-	    initializeValues();
+    try {
+		if(JAXRSFacetDelegateUtils.isDynamicWebProject(getProject())) {
+		this.provider = JAXRSUtils.getModelProvider(getProject());
+		if (provider != null)
+			this.webAppObj = provider.getModelObject();
+		if (doesDDFileExist(getProject(), this.webXMLPath)) {
+		    servletInfoGroup = new ServletInformationGroup((Composite) c, SWT.NONE);
+				servletInfoGroup.txtJAXRSServletName.addListener(SWT.Modify,
+						new Listener() {
+							public void handleEvent(Event arg0) {
+								updateValidation();
+							}
+						});
+				servletInfoGroup.txtJAXRSServletClassName.addListener(SWT.Modify,
+						new Listener() {
+							public void handleEvent(Event arg0) {
+								updateValidation();
+							}
+						});
+		    initializeValues();
+		}
+		}
+	} catch (CoreException e) {
+		JAXRSUIPlugin.log(IStatus.ERROR,NLS.bind(Messages.JAXRSFacetUninstallDelegate_ConfigErr,
+				getProject().getName()), e);
 	}
     return c;
   }
@@ -237,8 +247,13 @@
 		}
 	  
     // Update the servlet properties
-	if (doesDDFileExist(getProject(), webXMLPath)) {
-	    createServletAndModifyWebXML(getProject(), null, new NullProgressMonitor());
+	try {
+		if (JAXRSFacetDelegateUtils.isDynamicWebProject(getProject()) && doesDDFileExist(getProject(), webXMLPath)) {
+		    createServletAndModifyWebXML(getProject(), null, new NullProgressMonitor());
+		}
+	} catch (CoreException e) {
+		JAXRSUIPlugin.log(IStatus.ERROR,NLS.bind(Messages.JAXRSFacetUninstallDelegate_ConfigErr,
+				getProject().getName()), e);
 	}
     return true;
   }
@@ -284,13 +299,20 @@
 	protected IStatus performValidation() {
 		IStatus superValidation = super.performValidation();
 		if (superValidation.isOK())
-			if (doesDDFileExist(getProject(), this.webXMLPath))
-			  if (servletInfoGroup != null && !servletInfoGroup.isDisposed())
-				  return validateServletInfo(servletInfoGroup.txtJAXRSServletName.getText(), servletInfoGroup.txtJAXRSServletClassName.getText());
-			  else
-			    return Status.OK_STATUS; // superValidation is ok
-			else
-				return Status.OK_STATUS;
+			try {
+				if (JAXRSFacetDelegateUtils.isDynamicWebProject(getProject()) && doesDDFileExist(getProject(), this.webXMLPath))
+				  if (servletInfoGroup != null && !servletInfoGroup.isDisposed())
+					  return validateServletInfo(servletInfoGroup.txtJAXRSServletName.getText(), servletInfoGroup.txtJAXRSServletClassName.getText());
+				  else
+				    return Status.OK_STATUS; // superValidation is ok
+				else
+					return Status.OK_STATUS;
+			} catch (CoreException e) {
+				String errorMessage = NLS.bind(
+						Messages.JAXRSFacetUninstallDelegate_ProjectErr,
+						getProject().getName());
+				return createErrorStatus(errorMessage);
+			}
 		else {
 			return superValidation;
 		}
diff --git a/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/project/facet/JAXRSUserLibraryProviderInstallPanel.java b/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/project/facet/JAXRSUserLibraryProviderInstallPanel.java
index 321bb8b..f7e634f 100644
--- a/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/project/facet/JAXRSUserLibraryProviderInstallPanel.java
+++ b/bundles/org.eclipse.jst.ws.jaxrs.ui/src/org/eclipse/jst/ws/jaxrs/ui/internal/project/facet/JAXRSUserLibraryProviderInstallPanel.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2010, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,6 +18,7 @@
  *******************************************************************************/
 package org.eclipse.jst.ws.jaxrs.ui.internal.project.facet;
 
+
 import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider;
 import org.eclipse.jst.common.project.facet.core.libprov.IPropertyChangeListener;
 import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
@@ -242,7 +243,6 @@
     });
     }
 
-    setDownloadCommandEnabled(false);
     initialize();
     return mainComp;
   }