public class ContextUtil extends Object
ServletContext| Constructor and Description |
|---|
ContextUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getInitParam(ServletContext context,
String name)
Retrieve the named context-parameter from the given
ServletContext. |
static String |
getInitParam(ServletContext context,
String name,
String deflt)
Retrieve the named context-parameter from the given
ServletContext. |
static boolean |
getInitParamBoolean(ServletContext context,
String name)
Retrieve the named context-parameter from the given
ServletContext. |
public static boolean getInitParamBoolean(ServletContext context, String name)
ServletContext. If the parameter is not defined,
return false, otherwise return the value as a boolean. If the value cannot be converted to a boolean type, return
false.public static String getInitParam(ServletContext context, String name)
ServletContext. If the parameter is not defined,
return null.public static String getInitParam(ServletContext context, String name, String deflt)
ServletContext. If the parameter is not defined,
return the default value instead.Copyright © 2013 OCPsoft. All Rights Reserved.