Methods such as JSP timing jump to specified page and timing refresh

JSP timing jump to the specified page

自动If there is such a demand, when you visit a jsp page, you want to jump to another page   within a certain period of time . For example: after a system is successfully logged sessionin, it is judged according to whether there is a user in the , and if it has been logged in, it will directly jump to the home page, which can be achieved in this way.
  The way responseto .

5秒后自动跳转到指定网页:
<% response.setHeader("refresh", "5;URL=deal.jsp");%> 

  As shown below:
write picture description here

JSP periodically refreshes the page

  Of course there are regular refreshes

5秒后定时刷新网页:
 <% response.setHeader("refresh", "10");%> 

JSP disable cache page

  By default, the browser will cache the web page, which can improve the display speed of the web page, but for some websites with high security requirements, it is usually necessary to disable the cache.

<% response.setHeader("Cache-Control", "no-store");  
   response.setDateHeader("Expires", 0);%>  

The above content learns the common usage of JSP built-in object response

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324797196&siteId=291194637