code: public CmsContainerElementBean getCurrentElement(ServletRequest req) throws CmsException {
  
          CmsJspStandardContextBean sCBean = CmsJspStandardContextBean.getInstance(req);
          CmsContainerElementBean element = sCBean.getElement();
          if (element == null) {
              throw new CmsException(
                  Messages.get().container(
                      Messages.ERR_READING_ELEMENT_FROM_REQUEST_1,
                      sCBean.getRequestContext().getUri()));
          }
          return element;
      }
docs: Reads the current element bean from the request.<p>
  
  @param req the servlet request
  
  @return the element bean
  
  @throws CmsException if no current element is set