Code example for MissingServletRequestPartException

Methods: getMessage

0
	 * @return an empty ModelAndView indicating the exception was handled 
	 * @throws IOException potentially thrown from response.sendError() 
	 */ 
	protected ModelAndView handleMissingServletRequestPartException(MissingServletRequestPartException ex, 
			HttpServletRequest request, HttpServletResponse response, Object handler) throws IOException { 
		response.sendError(HttpServletResponse.SC_BAD_REQUEST, ex.getMessage()); 
		return new ModelAndView(); 
	} 
 
	/** 
	 * Handle the case where an {@linkplain ModelAttribute @ModelAttribute} method 
	 * argument has binding or validation errors and is not followed by another 
	 * method argument of type {@link BindingResult}. 
	 * By default an HTTP 400 error is sent back to the client. 
	 * @param request current HTTP request 
	 * @param response current HTTP response 
	 * @param handler the executed handler 
	 * @return an empty ModelAndView indicating the exception was handled 
	 * @throws IOException potentially thrown from response.sendError() 
	 */