This approach is very useful for simple submissions, where binding request parameters to a command object would be overkill.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private static class | |
| private abstract static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final ServletRequestUtils. | |
| private static final ServletRequestUtils. | |
| private static final ServletRequestUtils. | |
| private static final ServletRequestUtils. | |
| private static final ServletRequestUtils. | |
| private static final ServletRequestUtils. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static Boolean | Returns: the Boolean value, ornull if not presentcurrent HTTP request request, String the name of the parameter name)Get a Boolean parameter, or |
| public static boolean | getBooleanParameter(ServletRequest
current HTTP request request, String the name of the parameter name, boolean the default value to use as fallback defaultVal)Get a boolean parameter, with a fallback value. |
| public static boolean[] | getBooleanParameters(ServletRequest
current HTTP request request, String the name of the parameter with multiple possible values name)Get an array of boolean parameters, return an empty array if not found. |
| public static Double | Returns: the Double value, ornull if not presentcurrent HTTP request request, String the name of the parameter name)Get a Double parameter, or |
| public static double | getDoubleParameter(ServletRequest
current HTTP request request, String the name of the parameter name, double the default value to use as fallback defaultVal)Get a double parameter, with a fallback value. |
| public static double[] | getDoubleParameters(ServletRequest
current HTTP request request, String the name of the parameter with multiple possible values name)Get an array of double parameters, return an empty array if not found. |
| public static Float | Returns: the Float value, ornull if not presentcurrent HTTP request request, String the name of the parameter name)Get a Float parameter, or |
| public static float | getFloatParameter(ServletRequest
current HTTP request request, String the name of the parameter name, float the default value to use as fallback defaultVal)Get a float parameter, with a fallback value. |
| public static float[] | getFloatParameters(ServletRequest
current HTTP request request, String the name of the parameter with multiple possible values name)Get an array of float parameters, return an empty array if not found. |
| public static Integer | Returns: the Integer value, ornull if not presentcurrent HTTP request request, String the name of the parameter name)Get an Integer parameter, or |
| public static int | getIntParameter(ServletRequest
current HTTP request request, String the name of the parameter name, int the default value to use as fallback defaultVal)Get an int parameter, with a fallback value. |
| public static int[] | getIntParameters(ServletRequest
current HTTP request request, String the name of the parameter with multiple possible values name)Get an array of int parameters, return an empty array if not found. |
| public static Long | Returns: the Long value, ornull if not presentcurrent HTTP request request, String the name of the parameter name)Get a Long parameter, or |
| public static long | getLongParameter(ServletRequest
current HTTP request request, String the name of the parameter name, long the default value to use as fallback defaultVal)Get a long parameter, with a fallback value. |
| public static long[] | getLongParameters(ServletRequest
current HTTP request request, String the name of the parameter with multiple possible values name)Get an array of long parameters, return an empty array if not found. |
| public static boolean | getRequiredBooleanParameter(ServletRequest
current HTTP request request, String the name of the parameter name)Get a boolean parameter, throwing an exception if it isn't found or isn't a boolean. |
| public static boolean[] | getRequiredBooleanParameters(ServletRequest
current HTTP request request, String the name of the parameter name)Get an array of boolean parameters, throwing an exception if not found or one isn't a boolean. |
| public static double | getRequiredDoubleParameter(ServletRequest
current HTTP request request, String the name of the parameter name)Get a double parameter, throwing an exception if it isn't found or isn't a number. |
| public static double[] | getRequiredDoubleParameters(ServletRequest
current HTTP request request, String the name of the parameter with multiple possible values name)Get an array of double parameters, throwing an exception if not found or one is not a number. |
| public static float | getRequiredFloatParameter(ServletRequest
current HTTP request request, String the name of the parameter name)Get a float parameter, throwing an exception if it isn't found or isn't a number. |
| public static float[] | getRequiredFloatParameters(ServletRequest
current HTTP request request, String the name of the parameter with multiple possible values name)Get an array of float parameters, throwing an exception if not found or one is not a number. |
| public static int | getRequiredIntParameter(ServletRequest
current HTTP request request, String the name of the parameter name)Get an int parameter, throwing an exception if it isn't found or isn't a number. |
| public static int[] | getRequiredIntParameters(ServletRequest
current HTTP request request, String the name of the parameter with multiple possible values name)Get an array of int parameters, throwing an exception if not found or one is not a number. |
| public static long | getRequiredLongParameter(ServletRequest
current HTTP request request, String the name of the parameter name)Get a long parameter, throwing an exception if it isn't found or isn't a number. |
| public static long[] | getRequiredLongParameters(ServletRequest
current HTTP request request, String the name of the parameter with multiple possible values name)Get an array of long parameters, throwing an exception if not found or one is not a number. |
| public static String | getRequiredStringParameter(ServletRequest
current HTTP request request, String the name of the parameter name)Get a String parameter, throwing an exception if it isn't found. |
| public static String[] | getRequiredStringParameters(ServletRequest
current HTTP request request, String the name of the parameter name)Get an array of String parameters, throwing an exception if not found. |
| public static String | Returns: the String value, ornull if not presentcurrent HTTP request request, String the name of the parameter name)Get a String parameter, or |
| public static String | getStringParameter(ServletRequest
current HTTP request request, String the name of the parameter name, String the default value to use as fallback defaultVal)Get a String parameter, with a fallback value. |
| public static String[] | getStringParameters(ServletRequest
current HTTP request request, String the name of the parameter with multiple possible values name)Get an array of String parameters, return an empty array if not found. |