HttpServletResponse设置http定时刷新网页(refresh)
HttpServletResponse设置http响应头控制浏览器定时刷新网页(refresh),设置代码如下:
protected void doGet(HttpServletRequest req, HttpServletResponse response) throws ServletException, IOException { response.setHeader("refresh", "5");//设置refresh响应头控制浏览器每隔5秒钟刷新一次 }
版权声明:本文为JAVASCHOOL原创文章,未经本站允许不得转载。