String doLoginPath = request.getContextPath() + "/login" + "?initialURI=" + request.getRequestURI();
response.sendRedirect(response.encodeRedirectURL(doLoginPath));
return true;
}
SiteKey siteKey = SiteKey.portal(requestSiteName);
String uri = requestPath;
// Resolve the user node if node path is indicated
if (!requestPath.equals("")) {
UserPortalConfig cfg = userPortalService.getUserPortalConfig(requestSiteName, request.getRemoteUser(),
userPortalContext);
if (cfg != null) {
UserPortal userPortal = cfg.getUserPortal();
UserNodeFilterConfig.Builder builder = UserNodeFilterConfig.builder().withAuthMode(
UserNodeFilterConfig.AUTH_READ);
UserNode userNode = userPortal.resolvePath(builder.build(), requestPath);
if (userNode != null) {
siteKey = userNode.getNavigation().getKey();
uri = userNode.getURI();
}
}
}
//
PortalURLContext urlContext = new PortalURLContext(context, siteKey);
NodeURL url = urlFactory.newURL(NodeURL.TYPE, urlContext);
url.setResource(new NavigationResource(siteKey.getType(), siteKey.getName(), uri));
url.setMimeType(MimeType.PLAIN);
Enumeration paraNames = request.getParameterNames();
while (paraNames.hasMoreElements()) {
String parameter = paraNames.nextElement().toString();