protected BrixConfig createBrixConfig( final ThreadLocalSessionFactory sf, final WorkspaceManager wm) { // create uri mapper for the cms // we are mounting the cms on the root, and getting the workspace // name from the // application properties UriMapper mapper = new PrefixUriMapper(Path.ROOT) { @Override public Workspace getWorkspaceForRequest(WebRequestCycle requestCycle, Brix brix) { final String name = getProperties().getJcrDefaultWorkspace(); final SitePlugin sitePlugin = SitePlugin.get(brix); return sitePlugin.getSiteWorkspace(name, getProperties().getWorkspaceDefaultState()); } }; BrixConfig config = new BrixConfig(sf, wm, mapper); config.setHttpPort(getProperties().getHttpPort()); config.setHttpsPort(getProperties().getHttpsPort()); return config; }