Examples of ResourceHandler


Examples of org.eclipse.jetty.server.handler.ResourceHandler

public class HTTPServer {

    public static void main(String[] args) throws Exception {
        InetSocketAddress bindAdress = new InetSocketAddress("localhost", 8888);
        Server server = new Server(bindAdress);
        ResourceHandler resourceHandler = new ResourceHandler();
        resourceHandler.setBaseResource(Resource.newClassPathResource("/org/apache/ivyde/sample/webappjsrepo/"));
        server.setHandler(resourceHandler);
        server.start();
        server.join();
    }
View Full Code Here

Examples of org.eclipse.jetty.server.handler.ResourceHandler

        server = new Server();
        SelectChannelConnector connector = new SelectChannelConnector();
        connector.setPort(port);
        server.addConnector(connector);

        ResourceHandler resource_handler = new ResourceHandler();
        resource_handler.setDirectoriesListed(true);
        resource_handler.setWelcomeFiles(new String[]{ "index.html" });

        resource_handler.setResourceBase(resourceBase);

        HandlerList handlers = new HandlerList();
        handlers.setHandlers(new Handler[] { resource_handler, new DefaultHandler() });
        server.setHandler(handlers);
        try {
View Full Code Here

Examples of org.eclipse.jetty.server.handler.ResourceHandler

        server = new Server();
        SelectChannelConnector connector = new SelectChannelConnector();
        connector.setPort(port);
        server.addConnector(connector);

        ResourceHandler resource_handler = new ResourceHandler();
        resource_handler.setDirectoriesListed(true);
        resource_handler.setWelcomeFiles(new String[]{ "index.html" });

        resource_handler.setResourceBase(resourceBase);

        HandlerList handlers = new HandlerList();
        handlers.setHandlers(new Handler[] { resource_handler, new DefaultHandler() });
        server.setHandler(handlers);
        try {
View Full Code Here

Examples of org.eclipse.jetty.server.handler.ResourceHandler

    @Test
    public void testHelloWorldExternalBindingFile() throws Exception {
        Server server = new Server(8585);

        ResourceHandler reshandler = new ResourceHandler();
        reshandler.setResourceBase(getLocation("/wsdl2java_wsdl/"));
        // this is the only handler we're supposed to need, so we don't need to 'add' it.
        server.setHandler(reshandler);
        server.start();
        env.put(ToolConstants.CFG_WSDLURL, "http://localhost:8585/hello_world.wsdl");
        env.put(ToolConstants.CFG_BINDING, "http://localhost:8585/remote-hello_world_binding.xsd");
        processor.setContext(env);
        processor.execute();
        try {
            reshandler.stop();
        } finally {
            server.stop();
            server.destroy();
        }
View Full Code Here

Examples of org.flexdock.plaf.resources.ResourceHandler

    public static Object getResource(String stringValue, String currentHandlerName, String defaultHandlerName) {
        String handlerName = isNull(currentHandlerName)? defaultHandlerName: currentHandlerName;
        if(isNull(handlerName))
            return nullify(stringValue);

        ResourceHandler handler = ResourceHandlerFactory.getResourceHandler(handlerName);
        return handler==null? nullify(stringValue): handler.getResource(stringValue);
    }
View Full Code Here

Examples of org.g4studio.core.resource.ResourceHandler

    }
    String handlerName = pName.toLowerCase();
    if (handlers.containsKey(handlerName) == false) {
      return null;
    }
    ResourceHandler result = (ResourceHandler) handlers.get(handlerName);
    return result;
  }
View Full Code Here

Examples of org.glassfish.api.invocation.ResourceHandler

    public void setMessageContext(MessageContext msgContext) {
       messageContext = msgContext;
    }

   public ResourceHandler getResourceHandler() {
       ResourceHandler rh = super.getResourceHandler();
       if (rh == null) {
           rh = context;
       }

       return rh;
View Full Code Here

Examples of org.jboss.injection.ResourceHandler

/*  444 */     handlers.add(new EJBHandler());
/*  445 */     handlers.add(new DependsHandler());
/*  446 */     handlers.add(new JndiInjectHandler());
/*  447 */     handlers.add(new PersistenceContextHandler());
/*  448 */     handlers.add(new PersistenceUnitHandler());
/*  449 */     handlers.add(new ResourceHandler());
/*  450 */     handlers.add(new WebServiceRefHandler());
/*      */
/*  452 */     ClassLoader old = Thread.currentThread().getContextClassLoader();
/*  453 */     Thread.currentThread().setContextClassLoader(this.classloader);
/*      */     try
View Full Code Here

Examples of org.mortbay.http.handler.ResourceHandler

    String logDir = System.getProperty("hadoop.log.dir");
    if (logDir != null) {
      HttpContext logContext = new HttpContext();
      logContext.setContextPath("/logs/*");
      logContext.setResourceBase(logDir);
      logContext.addHandler(new ResourceHandler());
      webServer.addContext(logContext);
    }

    // set up the context for "/static/*"
    String appDir = getWebAppsPath();
    HttpContext staticContext = new HttpContext();
    staticContext.setContextPath("/static/*");
    staticContext.setResourceBase(appDir + "/static");
    staticContext.addHandler(new ResourceHandler());
    webServer.addContext(staticContext);

    // set up the context for "/" jsp files
    webAppContext =
      webServer.addWebApplication("/", appDir + File.separator + name);
View Full Code Here

Examples of org.mortbay.http.handler.ResourceHandler

    String logDir = System.getProperty("hbase.log.dir");
    if (logDir != null) {
      HttpContext logContext = new HttpContext();
      logContext.setContextPath("/logs/*");
      logContext.setResourceBase(logDir);
      logContext.addHandler(new ResourceHandler());
      webServer.addContext(logContext);
    }
   
    if (name.equals("master")) {
      // Put up the rest webapp.
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.