public static String getDescriptionInfo(CmsFlexController controller, HttpServletRequest req) {

        String result = null;
        CmsObject cms = controller.getCmsObject();

        try {

            CmsJspStandardContextBean contextBean = CmsJspStandardContextBean.getInstance(req);
            if (contextBean.isDetailRequest()) {
                // this is a request to a detail page
                CmsResource res = contextBean.getDetailContent();
                // read the description of the detail resource as fall back (may contain mapping from another locale)
                result = cms.readPropertyObject(res, CmsPropertyDefinition.PROPERTY_DESCRIPTION, false).getValue();
            }
            if (result == null) {
                // read the title of the requested resource as fall back
                result = cms.readPropertyObject(
                    cms.getRequestContext().getUri(),
                    CmsPropertyDefinition.PROPERTY_DESCRIPTION,
                    true).getValue();
            }
        } catch (CmsException e) {
            // NOOP, result will be null
        }
        if (CmsStringUtil.isEmptyOrWhitespaceOnly(result)) {
            result = "";
        }

        return result;
    }
public static String getDescriptionInfo ( CmsFlexController controller , HttpServletRequest req ) { String result = null ; CmsObject cms = controller . getCmsObject ( ) ; try { CmsJspStandardContextBean contextBean = CmsJspStandardContextBean . getInstance ( req ) ; if ( contextBean . isDetailRequest ( ) ) { CmsResource res = contextBean . getDetailContent ( ) ; result = cms . readPropertyObject ( res , CmsPropertyDefinition . PROPERTY_DESCRIPTION , false ) . getValue ( ) ; } if ( result == null ) { result = cms . readPropertyObject ( cms . getRequestContext ( ) . getUri ( ) , CmsPropertyDefinition . PROPERTY_DESCRIPTION , true ) . getValue ( ) ; } } catch ( CmsException e ) { } if ( CmsStringUtil . isEmptyOrWhitespaceOnly ( result ) ) { result = "" ; } return result ; }
Returns the description of a page delivered from OpenCms, usually used for the <code>description</code> metatag of
a HTML page.<p>

If no description information has been found, the empty String "" is returned.<p>

@param controller the current OpenCms request controller
@param req the current request

@return the description of a page delivered from OpenCms