private void updateFileServer() { final Collection<PathNode> nodes = new HashSet<PathNode>(bundleNodeMap.values()); if (extraPath != null) { nodes.add(new FilePathNode(extraPath)); } MultiPathNode multiPathNode = new MultiPathNode(nodes. toArray(new PathNode[nodes.size()])); fileServer = new FileServer(multiPathNode); } }
protected void activate(ComponentContext context) throws IOException, URISyntaxException { Bundle bundle = context.getBundleContext().getBundle(); URL resourceDir = getClass().getResource("staticweb"); PathNode pathNode = new BundlePathNode(bundle, resourceDir.getPath()); fileServer = new FileServer(pathNode); URL template = getClass().getResource("language-list.ssp"); renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(), new UriRef(template.toURI().toString()), LANGUAGE.LanguageList, "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true); }
protected void activate(ComponentContext context) throws IOException, URISyntaxException { Bundle bundle = context.getBundleContext().getBundle(); URL resourceDir = getClass().getResource("staticweb"); PathNode pathNode = new BundlePathNode(bundle, resourceDir.getPath()); logger.debug("Initializing file server for {} ({})", resourceDir, resourceDir.getFile()); fileServer = new FileServer(pathNode); URL template = getClass().getResource( "config.ssp"); renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(), new UriRef(template.toURI().toString()), CONFIG_PAGE, "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true); }
resourceDir.getFile()); fileServer = new FileServer(pathNode); URL renderlet = getClass().getResource("scriptmanager-script-overview.ssp"); renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
resourceDir.getFile()); fileServer = new FileServer(pathNode);