}
// aling: I don't not fully understand why for catalog login URL currentFieldIndex
// could equal to array lenth, for buyer logic url it equals length - 1, which is correct
if (pathComponentCount > currentFieldIndex) {
String[] pathComponentsArray = pathComponents.array();
String firstField = pathComponentsArray[currentFieldIndex];
// Note: when user types trailing "/" in their URL,
// say http://y:8001/Ariba/Buyer/, here we got "", so this if branch
// is to solve the trailing "/" problem
// Defect 81707 and 79077