Ondrej Medek - 2009-11-13

I think it should be:

new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US)

moreover, the date formatter should be a static property to speed the request a little bit:

private static final DateFormat dateFormatter = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss zzz", Locale.ROOT);
static {
dateFormatter.setTimeZone(TimeZone.getTimeZone("GMT"));
}

public static void setCacheHeader(HttpServletResponse response, long expirationTime) {
response.setHeader("Pragma", "");
response.setHeader("Cache-Control", "public");
Date expirationDate = new Date(System.currentTimeMillis() + expirationTime);
response.setHeader("Expires", dateFormatter.format(expirationDate));
}