WebUrl url = getRequest().getUrl();
Site site = request.getSite();
ContentRepository contentRepository = site.getContentRepository();
if (contentRepository == null) {
logger.debug("Content repository unavailable for site '{}'", site.getIdentifier());
throw new ContentRepositoryUnavailableException("Repository is offline");
}
targetPage = (Page) getRequest().getAttribute(WebloungeRequest.PAGE);
// If no page was specified, take homepage instead.