code: protected void setTemplateRequestAttributes(CmsTemplateLoaderFacade loaderFacade, HttpServletRequest req) {
  
          CmsTemplateContext context = loaderFacade.getTemplateContext();
          req.setAttribute(CmsTemplateContextManager.ATTR_TEMPLATE_CONTEXT, context);
          TemplateBean templateBean = new TemplateBean(
              context != null ? context.getKey() : loaderFacade.getTemplateName(),
              loaderFacade.getTemplate());
          templateBean.setForced((context != null) && context.isForced());
          req.setAttribute(CmsTemplateContextManager.ATTR_TEMPLATE_BEAN, templateBean);
      }
docs: Sets request attributes that provide access to the template configuration.<p>
  
  @param loaderFacade the template loader facade
  @param req the servlet request