BBjspPageContext::removeAttribute (Deprecated)

The BBJSP system is deprecated. For new development, use BBxServlet.

Description

In BBj 16.0 and higher, this method removes the attributes bound to the specified name within the specified scope.

Syntax

Return Value

Method

void

removeAttribute(string name)

void

removeAttribute(string name, int scope)

Parameters

Variable

Description

name

the name of attribute to be removed

scope

the scope from which to remove the attribute

Return Value

None.

Remarks

Example

This example demonstrates how this works in a BBJSP web-page

<%@ taglib uri='/WEB-CFG/tld/core.tld' prefix='c' %>
<html>
    <body>
        <h1>Hello from BBJSP</h1>
        <ul>
            <c:iterate data="<%= #PageContext!.getAttributeNames() %>" id="name">
                <%
                    REM = Get the "name" from the page context
                    name$ = #PageContext!.getAttribute("name")
                %>
                <li><b>${name}</b> = <%= str(#PageContext!.getAttribute(name$)) %>
                <%
                    REM = Now remove the attribute
                    #PageContext!.removeAttribute("name")
                %>
            </c:iterate>
        </ul>
    </body>
</html>

See Also

BBJSP

BBjspPageContext