org.milyn.servlet
Class ServletParamUtils
java.lang.Object
org.milyn.servlet.ServletParamUtils
- public abstract class ServletParamUtils
- extends java.lang.Object
Servlet parameter utilities.
- Author:
- tfennelly
Method Summary |
static java.lang.String |
getParameterValue(java.lang.String paramName,
javax.servlet.ServletConfig config)
Get a Servlet configuration parameter. |
static java.lang.String |
getParameterValue(java.lang.String paramName,
javax.servlet.ServletConfig config,
java.lang.String defaultVal)
Get a Servlet configuration parameter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletParamUtils
public ServletParamUtils()
getParameterValue
public static java.lang.String getParameterValue(java.lang.String paramName,
javax.servlet.ServletConfig config)
- Get a Servlet configuration parameter.
This method will check the Servlet configuration (init-param config parameters)
for a definition of 'paramName'. If not specified in the Servlet configuration,
it will check the servlet context configuration parameters (context-param).
- Parameters:
paramName
- The name of the parameter.config
- The ServletConfig instance.
- Returns:
- The parameter value, or null if not defined.
getParameterValue
public static java.lang.String getParameterValue(java.lang.String paramName,
javax.servlet.ServletConfig config,
java.lang.String defaultVal)
- Get a Servlet configuration parameter.
This method will check the Servlet configuration (init-param config parameters)
for a definition of 'paramName'. If not specified in the Servlet configuration,
it will check the servlet context configuration parameters (context-param).
- Parameters:
paramName
- The name of the parameter.config
- The ServletConfig instance.defaultVal
- The value returned if the pararameter is not defined.
- Returns:
- The parameter value, or 'defaultVal' if not defined.