Interface I_CmsResourceInit

    • Field Detail


        static final java.lang.String ATTR_ALTERNATIVE_CMS_OBJECT
        Resource init handlers can use this attribute to pass an alternative CmsObject for loading the resource returned by them.
        See Also:
        Constant Field Values
    • Method Detail

      • initResource

        CmsResource initResource​(CmsResource resource,
                                 CmsObject cms,
                                 javax.servlet.http.HttpServletRequest req,
                                 javax.servlet.http.HttpServletResponse res)
                          throws CmsResourceInitException,
        Possibility to modify or change the CmsFile with the CmsObject.

        Caution: reading parameters from the request, destroys special characters in all parameters, because the encoding for the request was not set yet.

        resource - the requested file
        cms - the current CmsObject
        req - the current request
        res - the current response
        a resource in the OpenCms VFS
        CmsResourceInitException - if other implementations of the interface should not be executed
        CmsSecurityException - if other implementations of the interface should not be executed, and the security exception should be escalated