code: private void exposeVariables() throws JspTagException {
  
          if (deferredExpression == null) {
              /*
               * We need to support null items returned from next(); we
               * do this simply by passing such non-items through to the
               * scoped variable as effectively 'null' (that is, by calling
               * removeAttribute()).
               *
               * Also, just to be defensive, we handle the case of a null
               * 'status' object as well.
               *
               * We call getCurrent() and getLoopStatus() (instead of just using
               * 'item' and 'status') to bridge to subclasses correctly.
               * A subclass can override getCurrent() or getLoopStatus() but still
               * depend on our doStartTag() and doAfterBody(), which call this
               * method (exposeVariables()), to expose 'item' and 'status'
               * correctly.
               */
              if (itemId != null) {
                  if (getCurrent() == null) {
                      pageContext.removeAttribute(itemId, PageContext.PAGE_SCOPE);
                  } else {
                      pageContext.setAttribute(itemId, getCurrent());
                  }
              }
          } else { //this is using a DeferredExpression
              ELContext myELContext = pageContext.getELContext();
              VariableMapper vm = myELContext.getVariableMapper();
              vm.setVariable(itemId, (ValueExpression) getCurrent());
          }
          if (statusId != null) {
              if (getLoopStatus() == null) {
                  pageContext.removeAttribute(statusId, PageContext.PAGE_SCOPE);
              } else {
                  pageContext.setAttribute(statusId, getLoopStatus());
              }
          }
  
      }
docs: Exposes attributes (formerly scripting variables, but no longer!)
  if appropriate.  Note that we don't really care, here, whether they're
  scripting variables or not.