Class RequestHelper

java.lang.Object
com.day.cq.wcm.commons.RequestHelper

public class RequestHelper extends Object
RequestHelper...
  • Constructor Details

    • RequestHelper

      public RequestHelper()
  • Method Details

    • 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 request
      resp - the response
      properties - 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 request
      resp - the response
      node - the current node
      Returns:
      true if the response was sent