code: @Override
      public int doEndTag() throws JspException {
          LocalizationContext locCtxt =
                  BundleSupport.getLocalizationContext(pageContext, basename);
  
          if (var != null) {
              pageContext.setAttribute(var, locCtxt, scope);
          } else {
              Config.set(pageContext, Config.FMT_LOCALIZATION_CONTEXT, locCtxt,
                      scope);
          }
  
          return EVAL_PAGE;
      }
docs: Tag logic