/** * Get a boolean parameter, throwing an exception if it isn't found * or 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 getRequiredBooleanParameter(ServletRequest request, String name) throws ServletRequestBindingException { return BOOLEAN_PARSER.parseBoolean(name, request.getParameter(name)); }
/** * Get a boolean parameter, throwing an exception if it isn't found * or 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 getRequiredBooleanParameter(ServletRequest request, String name) throws ServletRequestBindingException { return BOOLEAN_PARSER.parseBoolean(name, request.getParameter(name)); }
/** * Get a boolean parameter, throwing an exception if it isn't found * or 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 getRequiredBooleanParameter(ServletRequest request, String name) throws ServletRequestBindingException { return BOOLEAN_PARSER.parseBoolean(name, request.getParameter(name)); }
/** * Get a boolean parameter, throwing an exception if it isn't found * or 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 getRequiredBooleanParameter(ServletRequest request, String name) throws ServletRequestBindingException { return BOOLEAN_PARSER.parseBoolean(name, request.getParameter(name)); }
public boolean[] parseBooleans(String name, String[] values) throws ServletRequestBindingException { validateRequiredParameter(name, values); boolean[] parameters = new boolean[values.length]; for (int i = 0; i < values.length; i++) { parameters[i] = parseBoolean(name, values[i]); } return parameters; } }
public boolean[] parseBooleans(String name, String[] values) throws ServletRequestBindingException { validateRequiredParameter(name, values); boolean[] parameters = new boolean[values.length]; for (int i = 0; i < values.length; i++) { parameters[i] = parseBoolean(name, values[i]); } return parameters; } }
public boolean[] parseBooleans(String name, String[] values) throws ServletRequestBindingException { validateRequiredParameter(name, values); boolean[] parameters = new boolean[values.length]; for (int i = 0; i < values.length; i++) { parameters[i] = parseBoolean(name, values[i]); } return parameters; } }
public boolean[] parseBooleans(String name, String[] values) throws ServletRequestBindingException { validateRequiredParameter(name, values); boolean[] parameters = new boolean[values.length]; for (int i = 0; i < values.length; i++) { parameters[i] = parseBoolean(name, values[i]); } return parameters; } }