public class ServletContextUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
getContextAttribute(javax.servlet.ServletContext context,
java.lang.String name,
java.lang.Class<?> type)
Returns the attribute with the specified name, but only if the value is
an instance of the specified type.
|
static void |
setContextAttribute(javax.servlet.ServletContext context,
java.lang.String name,
java.lang.Object value)
Sets the attribute with the specified value.
|
public static java.lang.Object getContextAttribute(javax.servlet.ServletContext context,
java.lang.String name,
java.lang.Class<?> type)
context - the servlet context.name - the name of the attribute.type - the required attribute type.public static void setContextAttribute(javax.servlet.ServletContext context,
java.lang.String name,
java.lang.Object value)
context - the servlet context.name - the name of the attribute.value - the value.Copyright ? Technia AB. All Rights Reserved.