Пример #1
0
 public void notModified(Date lastModified, Date date) {
   status = 304;
   noContent();
   SimpleDateFormat httpDateFormat = makeStandardHttpDateFormat();
   addHeader("Date", httpDateFormat.format(date));
   setLastModifiedHeader(lastModified);
   addHeader("Cache-Control", "private");
 }
Пример #2
0
 protected void addContentHeaders() {
   addHeader("Content-Type", getContentType());
 }
Пример #3
0
 public void setLastModifiedHeader(Date date) {
   addHeader("Last-Modified", makeStandardHttpDateFormat().format(date));
 }
Пример #4
0
 public void setMaxAge(int age) {
   addHeader("Cache-Control", "max-age=" + age);
 }
Пример #5
0
 public void redirect(String contextRoot, String location) {
   status = 303;
   addHeader("Location", contextRoot + location);
 }