Example usage for javax.servlet.jsp PageContext getClass

List of usage examples for javax.servlet.jsp PageContext getClass

Introduction

In this page you can find the example usage for javax.servlet.jsp PageContext getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:org.apache.tiles.jsp.context.JspUtil.java

/**
 * Configures the container to be used in the application.
 *
 * @param context The page context object to use.
 * @param container The container object to set.
 * @param key The key under which the container will be stored.
 * @since 2.1.2// ww w.  j a  va 2  s .com
 */
public static void setContainer(PageContext context, TilesContainer container, String key) {
    Log log = LogFactory.getLog(ServletUtil.class);
    if (key == null) {
        key = TilesAccess.CONTAINER_ATTRIBUTE;
    }

    if (container == null) {
        if (log.isInfoEnabled()) {
            log.info("Removing TilesContext for context: " + context.getClass().getName());
        }
        context.removeAttribute(key, PageContext.APPLICATION_SCOPE);
    }
    if (container != null && log.isInfoEnabled()) {
        log.info("Publishing TilesContext for context: " + context.getClass().getName());
    }
    context.setAttribute(key, container, PageContext.APPLICATION_SCOPE);
}