Package com.day.cq.wcm.commons
Class RequestHelper
- java.lang.Object
-
- com.day.cq.wcm.commons.RequestHelper
-
public class RequestHelper extends java.lang.Object
RequestHelper
...
-
-
Constructor Summary
Constructors Constructor Description RequestHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
handleIfModifiedSince(HttpServletRequest req, HttpServletResponse resp, Node node)
Checks if the request contains a if-last-modified-since header and if the node has a jcr:lastModified property.static boolean
handleIfModifiedSince(HttpServletRequest req, HttpServletResponse resp, ValueMap properties)
Checks if the request contains a if-last-modified-since header and if the properties have a jcr:lastModified property.
-
-
-
Method Detail
-
handleIfModifiedSince
public static boolean handleIfModifiedSince(HttpServletRequest req, HttpServletResponse resp, ValueMap properties)
Checks if the request contains a if-last-modified-since header and if the properties have a jcr:lastModified property. if the properties were modified before the header a 304 is sent otherwise the response last modified header is set.- Parameters:
req
- the requestresp
- the responseproperties
- the properties- Returns:
true
if the response was sent
-
handleIfModifiedSince
public static boolean handleIfModifiedSince(HttpServletRequest req, HttpServletResponse resp, Node node)
Checks if the request contains a if-last-modified-since header and if the node has a jcr:lastModified property. if the properties were modified before the header a 304 is sent otherwise the response last modified header is set. If the give doesn't have the property, the parent node is searched.- Parameters:
req
- the requestresp
- the responsenode
- the current node- Returns:
true
if the response was sent
-
-