예제 #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);
 }