// Construct portal URL using info retrieved from servlet request.
PortalURL portalURL = null;
if ((request.isSecure() && port != 443)
|| (!request.isSecure() && port != 80)) {
portalURL = new PortalURLImpl(protocol, server, port, contextPath, servletName);
} else {
portalURL = new PortalURLImpl(protocol, server, contextPath, servletName);
}
String pathInfo = request.getPathInfo();
if (pathInfo == null) {
return portalURL;