HttpServletResponse sendRedirect permanent

You need to set the response status and the Location header manually.

response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
response.setHeader("Location", "http://somewhere/");

Setting the status before sendRedirect() won’t work as sendRedirect() would overridde it to SC_FOUND afterwards.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)