Example usage for javax.servlet.jsp PageContext setAttribute

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

Introduction

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

Prototype


abstract public void setAttribute(String name, Object value, int scope);

Source Link

Document

Register the name and value specified with appropriate scope semantics.

Usage

From source file:org.vulpe.view.tags.Functions.java

/**
 *
 * @param pageContext//ww  w. j a  va  2s .  c  o  m
 * @param key
 * @param value
 * @param scope
 * @return
 */
public static Object put(final PageContext pageContext, final String key, final Object value,
        final Integer scope) {
    pageContext.setAttribute(key, value, scope);
    return value;
}