@Override public void removeAttribute(String name) { Assert.notNull(name, "Attribute name must not be null"); this.removeAttribute(name, PageContext.PAGE_SCOPE); this.removeAttribute(name, PageContext.REQUEST_SCOPE); this.removeAttribute(name, PageContext.SESSION_SCOPE); this.removeAttribute(name, PageContext.APPLICATION_SCOPE); }
@Test public void removeAttributeWithNoScopeSpecifiedRemovesValueFromAllScopes() throws Exception { ctx.setAttribute(key, value, PageContext.APPLICATION_SCOPE); ctx.removeAttribute(key); assertNull(ctx.getAttribute(key, PageContext.PAGE_SCOPE)); assertNull(ctx.getAttribute(key, PageContext.APPLICATION_SCOPE)); assertNull(ctx.getAttribute(key, PageContext.REQUEST_SCOPE)); assertNull(ctx.getAttribute(key, PageContext.SESSION_SCOPE)); }
@Override public void removeAttribute(String name) { Assert.notNull(name, "Attribute name must not be null"); this.removeAttribute(name, PageContext.PAGE_SCOPE); this.removeAttribute(name, PageContext.REQUEST_SCOPE); this.removeAttribute(name, PageContext.SESSION_SCOPE); this.removeAttribute(name, PageContext.APPLICATION_SCOPE); }
@Override public void removeAttribute(String name) { Assert.notNull(name, "Attribute name must not be null"); this.removeAttribute(name, PageContext.PAGE_SCOPE); this.removeAttribute(name, PageContext.REQUEST_SCOPE); this.removeAttribute(name, PageContext.SESSION_SCOPE); this.removeAttribute(name, PageContext.APPLICATION_SCOPE); }