| java.lang.Object org.apache.roller.ui.rendering.util.ModDateHeaderUtil
ModDateHeaderUtil | public class ModDateHeaderUtil (Code) | | Utility class to localize the modification date header-related logic.
|
Method Summary | |
public static boolean | respondIfNotModified(HttpServletRequest request, HttpServletResponse response, long lastModifiedTimeMillis) Sets the HTTP response status to 304 (NOT MODIFIED) if the request contains an
If-Modified-Since header that specifies a time that is
at or after the time specified by the value of lastModifiedTimeMillis
truncated to second granularity. | public static void | setLastModifiedHeader(HttpServletResponse response, long lastModifiedTimeMillis) Set the Last-Modified header using the given time in milliseconds. |
respondIfNotModified | public static boolean respondIfNotModified(HttpServletRequest request, HttpServletResponse response, long lastModifiedTimeMillis)(Code) | | Sets the HTTP response status to 304 (NOT MODIFIED) if the request contains an
If-Modified-Since header that specifies a time that is
at or after the time specified by the value of lastModifiedTimeMillis
truncated to second granularity. Returns true if
the response status was set, false if not.
Parameters: request - Parameters: response - Parameters: lastModifiedTimeMillis - true if a response status was sent, false otherwise. |
setLastModifiedHeader | public static void setLastModifiedHeader(HttpServletResponse response, long lastModifiedTimeMillis)(Code) | | Set the Last-Modified header using the given time in milliseconds. Note that because the
header has the granularity of one second, the value will get truncated to the nearest second that does not
exceed the provided value.
This will also set the Expires header to a date in the past. This forces clients to revalidate the cache each
time.
Parameters: response - Parameters: lastModifiedTimeMillis - |
|
|