From 63ce3d9099022e3e4f43cd84af5a3e938540959e Mon Sep 17 00:00:00 2001 From: justlive1 Date: Tue, 27 Nov 2018 18:03:01 +0800 Subject: [PATCH] =?UTF-8?q?Refresh=E7=9A=84=E5=8D=95=E4=BD=8D=E5=85=B6?= =?UTF-8?q?=E5=AE=9E=E6=98=AF=E7=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Java相关/J2EE基础知识.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Java相关/J2EE基础知识.md b/Java相关/J2EE基础知识.md index f673332a..3f37100c 100644 --- a/Java相关/J2EE基础知识.md +++ b/Java相关/J2EE基础知识.md @@ -123,9 +123,9 @@ redirect:低. ## 自动刷新(Refresh) 自动刷新不仅可以实现一段时间之后自动跳转到另一个页面,还可以实现一段时间之后自动刷新本页面。Servlet中通过HttpServletResponse对象设置Header属性实现自动刷新例如: ```java -Response.setHeader("Refresh","1000;URL=http://localhost:8080/servlet/example.htm"); +Response.setHeader("Refresh","5;URL=http://localhost:8080/servlet/example.htm"); ``` -其中1000为时间,单位为毫秒。URL指定就是要跳转的页面(如果设置自己的路径,就会实现没过一秒自动刷新本页面一次) +其中5为时间,单位为秒。URL指定就是要跳转的页面(如果设置自己的路径,就会实现没过一秒自动刷新本页面一次) ## Servlet与线程安全