struts1的tiles导致的response cache无法禁止的issue
近日struts 1项目中遇到一个很怪异的问题,项目中的所有.do都是继承自同一个root tiles,根JSP里面有把cache禁掉:
response.setHeader("Cache-Control", "no-cache, must-revalidate, proxy-revalidate, no-store");response.setHeader("Pragma", "no-cache");response.setHeader("Expires", "0");response.setDateHeader("Expires", 0L);
<action path="/Index" type="com.cuishen.HomeAction"><forward name="success" path="success.home"/></action>
<definition name="success.home" path="/user/info.do" />
<action path="/Index" type="com.cuishen.HomeAction"><forward name="success" path="/user/info.do"/></action>