diff -r 726629641ae4 j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/config/WLServerLibraryManager.java --- a/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/config/WLServerLibraryManager.java Tue Jun 07 22:43:48 2011 +0200 +++ b/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/config/WLServerLibraryManager.java Tue Jun 07 23:34:43 2011 +0200 @@ -50,6 +50,7 @@ import java.util.logging.Logger; import javax.enterprise.deploy.spi.status.ProgressObject; import org.netbeans.modules.j2ee.deployment.common.api.ConfigurationException; +import org.netbeans.modules.j2ee.deployment.common.api.Version; import org.netbeans.modules.j2ee.deployment.plugins.api.ServerLibrary; import org.netbeans.modules.j2ee.deployment.plugins.api.ServerLibraryDependency; import org.netbeans.modules.j2ee.deployment.plugins.spi.ServerLibraryFactory; @@ -68,6 +69,10 @@ private static final Logger LOGGER = Logger.getLogger(WLServerLibraryManager.class.getName()); + private static final String DWP_JSF_SPEC_TITLE = "JavaServer Faces"; // NOI18N + + private static final Version DWP_JSF_SPEC_VERSION = Version.fromJsr277OrDottedNotationWithFallback("2.0"); // NOI18N + private final WLDeploymentManager manager; private final WLServerLibrarySupport support; @@ -112,6 +117,24 @@ // this handles only archives @Override public Set getDeployableLibraries() { + if (manager.isWebProfile()) { + // we are handling jsf in DWP here - it should not be offered via this + // API method, but for legacy apps the missing/deploy machinery has to + // be available + Map deployable = support.getDeployableFiles(); + for (Iterator> it = deployable.entrySet().iterator(); it.hasNext();) { + Map.Entry entry = it.next(); + ServerLibrary lib = entry.getKey(); + if (DWP_JSF_SPEC_TITLE.equals(lib.getSpecificationTitle()) + && DWP_JSF_SPEC_VERSION.equals(lib.getSpecificationVersion()) + // defensive check on size + && entry.getValue().length() < 10240) { + it.remove(); + break; + } + } + return deployable.keySet(); + } return support.getDeployableFiles().keySet(); } diff -r 726629641ae4 web.jsf/src/org/netbeans/modules/web/jsf/wizards/JSFConfigurationPanelVisual.java --- a/web.jsf/src/org/netbeans/modules/web/jsf/wizards/JSFConfigurationPanelVisual.java Tue Jun 07 22:43:48 2011 +0200 +++ b/web.jsf/src/org/netbeans/modules/web/jsf/wizards/JSFConfigurationPanelVisual.java Tue Jun 07 23:34:43 2011 +0200 @@ -249,12 +249,10 @@ // @Override // public void run() { synchronized (this) { - boolean serverLib = false; if (isServerRegistered(serverInstanceID)) { try { ServerInstance.LibraryManager libManager = Deployment.getDefault().getServerInstance(serverInstanceID).getLibraryManager(); if (libManager != null) { - serverLib = true; Set libs = new HashSet(); libs.addAll(libManager.getDeployedLibraries()); libs.addAll(libManager.getDeployableLibraries()); @@ -280,7 +278,7 @@ } } - if (!serverLib) { + if (serverJsfLibraries.isEmpty()) { File[] cp; J2eePlatform platform = null; try {