public CmsUgcSession createSession(CmsObject cms, HttpServletRequest request, String sitePath)
    throws CmsUgcException {

        CmsUgcConfigurationReader reader = new CmsUgcConfigurationReader(cms);
        CmsUgcConfiguration config = null;
        try {
            CmsFile configFile = cms.readFile(sitePath);
            config = reader.readConfiguration(configFile);
        } catch (Exception e) {
            LOG.error(e.getLocalizedMessage(), e);
            throw new CmsUgcException(e, CmsUgcConstants.ErrorCode.errConfiguration, e.getLocalizedMessage());
        }
        return createSession(cms, request, config);
    }
public CmsUgcSession createSession ( CmsObject cms , HttpServletRequest request , String sitePath ) throws CmsUgcException { CmsUgcConfigurationReader reader = new CmsUgcConfigurationReader ( cms ) ; CmsUgcConfiguration config = null ; try { CmsFile configFile = cms . readFile ( sitePath ) ; config = reader . readConfiguration ( configFile ) ; } catch ( Exception e ) { LOG . error ( e . getLocalizedMessage ( ) , e ) ; throw new CmsUgcException ( e , CmsUgcConstants . ErrorCode . errConfiguration , e . getLocalizedMessage ( ) ) ; } return createSession ( cms , request , config ) ; }
Creates a new editing session.<p>

@param cms the cms context
@param request the request
@param sitePath the configuration site path

@return the form session

@throws CmsUgcException if creating the session fails