if (!isPortValid(port)) {
errs.add(Globals.ERROR_KEY, new ActionMessage("installation.webServer.error.invalidPortNumber", getPort()));
return;
}
PropertyList listeningInterfaces = PropertyList.createFromTextFieldText(getListeningInterfaces().equals("") ? "0.0.0.0"
: getListeningInterfaces());
boolean containsRootAddress = false;
for (String address : listeningInterfaces) {
if (!isHostAndPortValid(address, port)) {
if (port < 1024) {
errs.add(Globals.ERROR_KEY, new ActionMessage("installation.webServer.error.portConflictLess1024",
getPort(), address));
} else {
errs.add(Globals.ERROR_KEY, new ActionMessage("installation.webServer.error.portConflict", getPort(),
address));
}
}
if (address.equals("0.0.0.0")) {
containsRootAddress = true;
}
}
if (containsRootAddress && listeningInterfaces.size() > 1) {
errs.add(Globals.ERROR_KEY, new ActionMessage("installation.webServer.invalidSelectedInterfaces"));
}
} catch (NumberFormatException nfe) {
errs.add(Globals.ERROR_KEY, new ActionMessage("installation.webServer.error.invalidPortNumber", getPort()));
}