|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hippoecm.hst.util.ServletConfigUtils
public class ServletConfigUtils
ServletConfig Utils
Method Summary | |
---|---|
static String |
getInitParameter(javax.servlet.ServletConfig servletConfig,
javax.servlet.ServletContext servletContext,
String paramName,
String defaultValue)
Retrieves the init parameter from the servletConfig or servletContext. |
static String |
getInitParameter(String paramName,
String defaultValue,
Object... configs)
Retrieves the init parameter from the given config objects which must have String getInitParameter(String); method. |
static boolean |
isBlank(String s)
Utility method to check if the given string is null or empty string or string having white spaces only. |
static boolean |
isEmpty(String s)
Utility method to check if the given string is null or empty string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String getInitParameter(javax.servlet.ServletConfig servletConfig, javax.servlet.ServletContext servletContext, String paramName, String defaultValue)
servletConfig
- servletConfig. If null, this is not used.servletContext
- servletContext. If null, this is not used.paramName
- parameter namedefaultValue
- the default value
public static String getInitParameter(String paramName, String defaultValue, Object... configs)
String getInitParameter(String);
method.
This utility method used Java Reflection API to invoke String getInitParameter(String);
method.
If the init parameter is not found in the first config object, then it will look up the init parameter from the next config object.
If the parameter is not found, then it will return the defaultValue.
paramName
- parameter namedefaultValue
- the default valueconfigs
-
public static boolean isEmpty(String s)
s
- public static boolean isBlank(String s)
s
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |