public static String removeOpenCmsContext ( final String path ) { String context = OpenCms . getSystemInfo ( ) . getOpenCmsContext ( ) ; if ( path . startsWith ( context + "/" ) ) { return path . substring ( context . length ( ) ) ; } String renderPrefix = OpenCms . getStaticExportManager ( ) . getVfsPrefix ( ) ; if ( path . startsWith ( renderPrefix + "/" ) ) { return path . substring ( renderPrefix . length ( ) ) ; } return path ; }
Given a path to a VFS resource the method removes the OpenCms context in case the path is prefixed by that context .