/** * Synchronize variables at end of tag file */ public void syncEndTagFile() { copyTagToPageScope(VariableInfo.AT_BEGIN); copyTagToPageScope(VariableInfo.AT_END); restoreNestedVariables(); }
public void handlePageException(Exception ex) throws IOException, ServletException { // Should never be called since handleException() called with a // Throwable in the generated servlet. handlePageException((Throwable) ex); }
/** * Synchronize variables at begin of tag file */ public void syncBeginTagFile() { saveNestedVariables(); }
Object obj = getAttribute(varName); varName = findAlias(varName); if (obj != null) { invokingJspCtxt.setAttribute(varName, obj);
/** * Saves the values of any NESTED variables that are present in the invoking * JSP context, so they can later be restored. */ private void saveNestedVariables() { if (nestedVars != null) { for (String varName : nestedVars) { varName = findAlias(varName); Object obj = invokingJspCtxt.getAttribute(varName); if (obj != null) { originalNestedVars.put(varName, obj); } } } }
@Override public void setAttribute(String name, Object value) { if (name == null) { throw new NullPointerException(Localizer .getMessage("jsp.error.attribute.null_name")); } if (value != null) { pageAttributes.put(name, value); } else { removeAttribute(name, PAGE_SCOPE); } }
public void removeAttribute(String name) { if (name == null) { throw new NullPointerException( Localizer.getMessage("jsp.error.attribute.null_name")); } pageAttributes.remove(name); invokingJspCtxt.removeAttribute(name, REQUEST_SCOPE); if (getSession() != null) { invokingJspCtxt.removeAttribute(name, SESSION_SCOPE); } invokingJspCtxt.removeAttribute(name, APPLICATION_SCOPE); }
public JspContextWrapper(JspContext jspContext, ArrayList nestedVars, ArrayList atBeginVars, ArrayList atEndVars, Map aliases) { this.invokingJspCtxt = (PageContext) jspContext; this.nestedVars = nestedVars; this.atBeginVars = atBeginVars; this.atEndVars = atEndVars; this.pageAttributes = new HashMap<String, Object>(16); this.aliases = aliases; if (nestedVars != null) { this.originalNestedVars = new HashMap<String, Object>(nestedVars.size()); } syncBeginTagFile(); }
/** * Synchronize variables before fragment invokation */ public void syncBeforeInvoke() { copyTagToPageScope(VariableInfo.NESTED); copyTagToPageScope(VariableInfo.AT_BEGIN); }
/** * VariableResolver interface */ @Override @Deprecated public Object resolveVariable(String pName) throws ELException { ELContext ctx = this.getELContext(); return ctx.getELResolver().getValue(ctx, null, pName); }
Object obj = getAttribute(varName); varName = findAlias(varName); if (obj != null) { invokingJspCtxt.setAttribute(varName, obj);
/** * Restores the values of any NESTED variables in the invoking JSP context. */ private void restoreNestedVariables() { if (nestedVars != null) { for (String varName : nestedVars) { varName = findAlias(varName); Object obj = originalNestedVars.get(varName); if (obj != null) { invokingJspCtxt.setAttribute(varName, obj); } else { invokingJspCtxt.removeAttribute(varName, PAGE_SCOPE); } } } }
public void setAttribute(String name, Object value) { if (name == null) { throw new NullPointerException( Localizer.getMessage("jsp.error.attribute.null_name")); } if (value != null) { pageAttributes.put(name, value); } else { removeAttribute(name, PAGE_SCOPE); } }
public void removeAttribute(String name) { if (name == null) { throw new NullPointerException( Localizer.getMessage("jsp.error.attribute.null_name")); } pageAttributes.remove(name); invokingJspCtxt.removeAttribute(name, REQUEST_SCOPE); if (getSession() != null) { invokingJspCtxt.removeAttribute(name, SESSION_SCOPE); } invokingJspCtxt.removeAttribute(name, APPLICATION_SCOPE); }
public JspContextWrapper(JspContext jspContext, ArrayList nestedVars, ArrayList atBeginVars, ArrayList atEndVars, Map aliases) { this.invokingJspCtxt = (PageContext) jspContext; this.nestedVars = nestedVars; this.atBeginVars = atBeginVars; this.atEndVars = atEndVars; this.pageAttributes = new Hashtable(16); this.aliases = aliases; if (nestedVars != null) { this.originalNestedVars = new Hashtable(nestedVars.size()); } syncBeginTagFile(); }
/** * Synchronize variables before fragment invokation */ public void syncBeforeInvoke() { copyTagToPageScope(VariableInfo.NESTED); copyTagToPageScope(VariableInfo.AT_BEGIN); }
/** * VariableResolver interface */ @Override @Deprecated public Object resolveVariable(String pName) throws ELException { ELContext ctx = this.getELContext(); return ctx.getELResolver().getValue(ctx, null, pName); }
Object obj = getAttribute(varName); varName = findAlias(varName); if (obj != null) { invokingJspCtxt.setAttribute(varName, obj);
/** * Synchronize variables at end of tag file */ public void syncEndTagFile() { copyTagToPageScope(VariableInfo.AT_BEGIN); copyTagToPageScope(VariableInfo.AT_END); restoreNestedVariables(); }
/** * Saves the values of any NESTED variables that are present in * the invoking JSP context, so they can later be restored. */ private void saveNestedVariables() { if (nestedVars != null) { Iterator<String> iter = nestedVars.iterator(); while (iter.hasNext()) { String varName = iter.next(); varName = findAlias(varName); Object obj = invokingJspCtxt.getAttribute(varName); if (obj != null) { originalNestedVars.put(varName, obj); } } } }