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