[354330] when hostname is blank the error states that the server does not support remote hosts
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.java
index f4dbcec..2665029 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.java
@@ -1,5 +1,5 @@
/**********************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 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
@@ -195,6 +195,7 @@
public static String wizNewServerSelect;
public static String wizNewServerManual;
public static String wizCheckRemoteSupport;
+ public static String wizEmptyHostName;
public static String wizSelectServerPreferred;
public static String wizNewServerExisting;
public static String wizNewServerRuntime;
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.properties b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.properties
index 0614651..fae6d5e 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.properties
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/Messages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2004, 2010 IBM Corporation and others.
+# Copyright (c) 2004, 2011 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
@@ -22,6 +22,7 @@
wizNewServerRuntime=Server &runtime environment:
wizNewServerRuntimeCreate=Create a new runtime environment
wizCheckRemoteSupport=The currently selected server type does not support remote hosts
+wizEmptyHostName=Server's host name must be set.
wizNewServerSelect=How do you want to select the server?
wizNewServerExisting=Choose an e&xisting server
diff --git a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/page/NewManualServerComposite.java b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/page/NewManualServerComposite.java
index 76da071..8ac0da6 100644
--- a/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/page/NewManualServerComposite.java
+++ b/plugins/org.eclipse.wst.server.ui/serverui/org/eclipse/wst/server/ui/internal/wizard/page/NewManualServerComposite.java
@@ -430,6 +430,10 @@
return false;
}
boolean supportsRemote = selectedServerType.supportsRemoteHosts();
+ if (hostname.getText().trim().length() == 0){
+ wizard.setMessage(NLS.bind(Messages.wizEmptyHostName, new Object[0]), IMessageProvider.ERROR);
+ return false;
+ }
if(!supportsRemote && !SocketUtil.isLocalhost(hostname.getText())) {
wizard.setMessage(NLS.bind(Messages.wizCheckRemoteSupport, new Object[0]), IMessageProvider.ERROR);
return false;