code: public static void sendRedirect(
  		HttpServletResponse response,
  		String location,
  		int status
  	) throws IllegalStateException, IOException {
  		// Response must not be committed
  		if(response.isCommitted()) throw new IllegalStateException("Unable to redirect: Response already committed");
  
  		response.setHeader("Location", location);
  		response.sendError(status);
  	}
docs: Sends a redirect to the provided absolute URL location.
  
  @see  #getRedirectLocation(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, java.lang.String)