/** * Matches the given request against all configures sites and returns * the matching site, or the default site if no sites matches.<p> * * @param req the request to match * * @return the matching site, or the default site if no sites matches */ public CmsSite matchRequest(HttpServletRequest req) { CmsSiteMatcher matcher = getRequestMatcher(req); if (matcher.getTimeOffset() != 0) { HttpSession session = req.getSession(); if (session != null) { session.setAttribute(CmsContextInfo.ATTRIBUTE_REQUEST_TIME, new Long(System.currentTimeMillis() + matcher.getTimeOffset())); } } CmsSite site = matchSite(matcher); if (LOG.isDebugEnabled()) { String requestServer = req.getScheme() + "://" + req.getServerName() + ":" + req.getServerPort(); LOG.debug(Messages.get().getBundle().key( Messages.LOG_MATCHING_REQUEST_TO_SITE_2, requestServer, site.toString())); } return site; }
/** * Matches the given request against all configures sites and returns * the matching site, or the default site if no sites matches.<p> * * @param req the request to match * * @return the matching site, or the default site if no sites matches */ public CmsSite matchRequest(HttpServletRequest req) { CmsSiteMatcher matcher = getRequestMatcher(req); if (matcher.getTimeOffset() != 0) { HttpSession session = req.getSession(); if (session != null) { session.setAttribute( CmsContextInfo.ATTRIBUTE_REQUEST_TIME, new Long(System.currentTimeMillis() + matcher.getTimeOffset())); } } CmsSite site = matchSite(matcher); if (LOG.isDebugEnabled()) { String requestServer = req.getScheme() + "://" + req.getServerName() + ":" + req.getServerPort(); LOG.debug( Messages.get().getBundle().key( Messages.LOG_MATCHING_REQUEST_TO_SITE_2, requestServer, site.toString())); } return site; }
/** * Returns the secure server url of this site root.<p> * * @return the secure server url */ public String getSecureUrl() { if (m_secureServer != null) { return m_secureServer.getUrl(); } else { LOG.error(Messages.get().getBundle().key(Messages.ERR_SECURESERVER_MISSING_1, toString())); return getUrl(); } }
m_siteRootSites.put(site.getSiteRoot(), site); if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_SITE_ROOT_ADDED_1, site.toString()));
m_siteRootSites.put(site.getSiteRoot(), site); if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_SITE_ROOT_ADDED_1, site.toString()));