实现jsp页面的定时自动刷新功能
上一篇 /
下一篇 2012-04-24 19:55:50
/ 个人分类:技术杂谈--随笔录
response.setHeader("refresh","1");//1秒钟自动刷新当前页面一次
response.setHeader("refresh","5;URL=http://www.baidu.com");//实现5秒后自动跳转到新页面(
百度)
setHeader(Stringname,String value);
void setHeader(String name,
String value)
Sets a response header with the given name and value. If the header had already been set,
the new value overwrites the previous one. The containsHeader method can be used to
test for the
presence of a header before setting its value.
Parameters: name - the name of the header
value - the header value If it contains octet
string, it should be encoded according to RFC 2047 (http://www.ietf.org/rfc/rfc2047.txt)See
Also: containsHeader(
java.lang.String), addHeader(java.lang.String, java.lang.String)
收藏
举报
TAG: