Class RequestHelper


  • public class RequestHelper
    extends java.lang.Object
    RequestHelper...
    • Constructor Detail

      • RequestHelper

        public RequestHelper()
    • 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 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