/** * Get an array of boolean parameters, throwing an exception if not found * or one isn't a boolean. * <p>Accepts "true", "on", "yes" (any case) and "1" as values for true; * treats every other non-empty value as false (i.e. parses leniently). * @param request current HTTP request * @param name the name of the parameter * @throws ServletRequestBindingException a subclass of ServletException, * so it doesn't need to be caught */ public static boolean[] getRequiredBooleanParameters(ServletRequest request, String name) throws ServletRequestBindingException { return BOOLEAN_PARSER.parseBooleans(name, request.getParameterValues(name)); }
/** * Get an array of boolean parameters, throwing an exception if not found * or one isn't a boolean. * <p>Accepts "true", "on", "yes" (any case) and "1" as values for true; * treats every other non-empty value as false (i.e. parses leniently). * @param request current HTTP request * @param name the name of the parameter * @throws ServletRequestBindingException a subclass of ServletException, * so it doesn't need to be caught */ public static boolean[] getRequiredBooleanParameters(ServletRequest request, String name) throws ServletRequestBindingException { return BOOLEAN_PARSER.parseBooleans(name, request.getParameterValues(name)); }
/** * Get an array of boolean parameters, throwing an exception if not found * or one isn't a boolean. * <p>Accepts "true", "on", "yes" (any case) and "1" as values for true; * treats every other non-empty value as false (i.e. parses leniently). * @param request current HTTP request * @param name the name of the parameter * @throws ServletRequestBindingException a subclass of ServletException, * so it doesn't need to be caught */ public static boolean[] getRequiredBooleanParameters(ServletRequest request, String name) throws ServletRequestBindingException { return BOOLEAN_PARSER.parseBooleans(name, request.getParameterValues(name)); }
/** * Get an array of boolean parameters, throwing an exception if not found * or one isn't a boolean. * <p>Accepts "true", "on", "yes" (any case) and "1" as values for true; * treats every other non-empty value as false (i.e. parses leniently). * @param request current HTTP request * @param name the name of the parameter * @throws ServletRequestBindingException a subclass of ServletException, * so it doesn't need to be caught */ public static boolean[] getRequiredBooleanParameters(ServletRequest request, String name) throws ServletRequestBindingException { return BOOLEAN_PARSER.parseBooleans(name, request.getParameterValues(name)); }