JSP page is cached, can not change it, tomcat

后端 未结 3 1590
无人共我
无人共我 2020-12-31 23:23

I have a java server, when I change something within the JSP code, and I call the page again from the browser, my changes are not shown, the server returns the

3条回答
  •  鱼传尺愫
    2021-01-01 00:01

    You can try doing 2 things:

    Set tag in web.xml

    
      weblogic.jsp.pageCheckSeconds
      0
    
    

    In you Jsp page at the top:

    <%
    response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
    response.setHeader("Pragma","no-cache"); //HTTP 1.0
    response.setDateHeader ("Expires", 0);
    %>
    

提交回复
热议问题