Examples of FileServer


Examples of com.github.timurstrekalov.saga.core.FileServer

    @Before
    public void setUp() throws Exception {
        final InstanceFieldPerPropertyConfig config = new InstanceFieldPerPropertyConfig();

        proxyServer = new InstrumentingProxyServer(new HtmlUnitBasedScriptInstrumenter(config));
        fileServer = new FileServer(new File(getClass().getResource("/tests").toURI()).getAbsolutePath());

        proxyServerPort = proxyServer.start();
        fileServerPort = fileServer.start();

        final String proxyUrl = "localhost:" + proxyServerPort;
View Full Code Here

Examples of com.vtence.molecule.middlewares.FileServer

        this.logger = logger;
    }

    public void run(WebServer server) throws IOException {
        // Serve files in this directory, based on the path of the request.
        FileServer files = new FileServer(locateOnClasspath("examples/fox"));
        // Serve static assets (e.g. js files, images, css files, etc) for any request whose path starts
        // with one of the url prefixes specified (in this example, we're serving all requests).
        StaticAssets assets = new StaticAssets(files).serve("/");
        // If request targets a directory (i.e. request path ends with "/"),
        // serve the index.html file located in that directory (the default behavior).
View Full Code Here

Examples of com.vtence.molecule.middlewares.FileServer

    private static final Object NO_CONTEXT = null;

    public void run(WebServer server) throws IOException {
        File content = ResourceLocator.locateOnClasspath("examples/fox");
        // Add cache directives to the response when serving files
        FileServer files = new FileServer(content).header(CACHE_CONTROL, "public; max-age=60");
        // Serve static assets for css, js and image files from the content dir.
        StaticAssets assets = new StaticAssets(files).serve("/css", "/js", "/images");
        // We use Mustache templates with an .html extension
        Templates templates = new Templates(new JMustacheRenderer().fromDir(content).extension("html"));
        final Template index = templates.named("index");
View Full Code Here

Examples of de.idos.updates.server.FileServer

  @Rule
  public TemporaryFolder folder = new TemporaryFolder();

  @BeforeClass
  public static void setUp() throws Exception {
    fileServer = new FileServer();
    fileServer.start();
  }
View Full Code Here

Examples of de.idos.updates.server.FileServer

  HttpRepository repository = new HttpRepository("http://localhost:8080/updates/");

  @BeforeClass
  public static void setUp() throws Exception {
    fileServer = new FileServer();
    fileServer.start();
  }
View Full Code Here

Examples of de.idos.updates.server.FileServer

  private File configuration;
  Properties properties = new Properties();

  @Before
  public void startServer() throws Exception {
    fileServer = new FileServer();
    fileServer.start();
  }
View Full Code Here

Examples of de.idos.updates.server.FileServer

    public TemporaryFolder folder = new TemporaryFolder();
    private static FileServer fileServer;

    @BeforeClass
    public static void setUp() throws Exception {
        fileServer = new FileServer();
        fileServer.start();
    }
View Full Code Here

Examples of de.idos.updates.server.FileServer

  private static FileServer fileServer;

  @BeforeClass
  public static void setUp() throws Exception {
    fileServer = new FileServer();
    fileServer.start();
  }
View Full Code Here

Examples of org.apache.clerezza.web.fileserver.FileServer

    URL resourceDir = getClass().getResource("staticweb");
    PathNode pathNode = new BundlePathNode(bundle, resourceDir.getPath());
    logger.info("Initializing file server for {} ({})", resourceDir,
        resourceDir.getFile());

    fileServer = new FileServer(pathNode);

    renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
        new UriRef(getClass().getResource(
        "user-overview-template.ssp").toURI().toString()),
        USERMANAGER.UserOverviewPage, "naked",
View Full Code Here

Examples of org.apache.clerezza.web.fileserver.FileServer

    URL resourceDir = getClass().getResource("staticweb");
    PathNode pathNode = new BundlePathNode(bundle, resourceDir.getPath());
    logger.info("Initializing file server for {} ({})", resourceDir,
        resourceDir.getFile());

    fileServer = new FileServer(pathNode);
    URL renderlet = getClass().getResource("scriptmanager-script-overview.ssp");
    renderletManager.registerRenderlet(ScalaServerPagesRenderlet.class.getName(),
        new UriRef(renderlet.toURI().toString()),
        SCRIPTMANAGER.ScriptManagerOverviewPage,
        "naked", MediaType.APPLICATION_XHTML_XML_TYPE, true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.