response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);提示你HttpServletResponse 不能作为一个变量把括号中的HttpServletResponse 改为 response试试。