response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); response.setHeader("Location", url); response.flushBuffer(); return "redirect:" + url;