@Override public int doEndTag() throws JspException { if (this.isRemoveOnEndTag()) { ServletRequest request = this.pageContext.getRequest(); RequestContext reqCtx = (RequestContext) request.getAttribute(RequestContext.REQCTX); try { ExecutorBeanContainer ebc = (ExecutorBeanContainer) reqCtx.getExtraParam(SystemConstants.EXTRAPAR_EXECUTOR_BEAN_CONTAINER); TemplateModel templateModel = ebc.getTemplateModel(); if (templateModel instanceof AllHttpScopesHashModel) { AllHttpScopesHashModel hashModel = (AllHttpScopesHashModel) templateModel; hashModel.remove(this.getVar()); } } catch (Throwable t) { _logger.error("error in doEndTag", t); throw new JspException("Error evaluating di end tag", t); } } this.release(); return EVAL_PAGE; }