[
https://issues.apache.org/jira/browse/HADOOP-3878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12618683#action_12618683
]
Steve Loughran commented on HADOOP-3878:
----------------------------------------
to fix this inline, something like the following is needed:
<%
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
response.setHeader("Expires", "0");
%>
However, this just increases the amount of replicated java code across every
JSP page.
Better to have a JSP utils class which is bound to the various instances, and
which can do this as part of a page init
public class JspPageHelper {
private HttpServletRequest request;
private HttpServletResponse response;
public JspPageHelper(HttpServletRequest request, HttpServletResponse
response) {
this.request = request;
this.response = response;
}
public void initPage() {
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
response.setHeader("Expires", "0");
}
}
This class could also do more of the jsp output, but then you'd need to have
the JSP classes on the classpath; this should clearly go into a separate module
under src/, have some tests, etc.
> JSP pages don't disable caching
> -------------------------------
>
> Key: HADOOP-3878
> URL: https://issues.apache.org/jira/browse/HADOOP-3878
> Project: Hadoop Core
> Issue Type: Bug
> Components: dfs
> Affects Versions: 0.19.0
> Reporter: Steve Loughran
> Priority: Minor
>
> None of the JSP pages disable caching. This is bad for long-haul diagnostics,
> as proxy servers may cache the content. Even if the remote cluster is down,
> the proxy may return the last-good status page showing all is well.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.