当前位置: 首页>>代码示例>>Java>>正文


Java Server.addHandler方法代码示例

本文整理汇总了Java中org.mortbay.jetty.Server.addHandler方法的典型用法代码示例。如果您正苦于以下问题:Java Server.addHandler方法的具体用法?Java Server.addHandler怎么用?Java Server.addHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.mortbay.jetty.Server的用法示例。


在下文中一共展示了Server.addHandler方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testJetty

import org.mortbay.jetty.Server; //导入方法依赖的package包/类
@Test
@TestJetty
public void testJetty() throws Exception {
  Context context = new Context();
  context.setContextPath("/");
  context.addServlet(MyServlet.class, "/bar");
  Server server = TestJettyHelper.getJettyServer();
  server.addHandler(context);
  server.start();
  URL url = new URL(TestJettyHelper.getJettyURL(), "/bar");
  HttpURLConnection conn = (HttpURLConnection) url.openConnection();
  assertEquals(conn.getResponseCode(), HttpURLConnection.HTTP_OK);
  BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
  assertEquals(reader.readLine(), "foo");
  reader.close();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:TestHTestCase.java

示例2: setUp

import org.mortbay.jetty.Server; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {

  ContextHandler context = new ContextHandler();
  context.setContextPath("/");
  context.setResourceBase(RES_DIR);
  ServletHandler sh = new ServletHandler();
  sh.addServletWithMapping("org.apache.jasper.servlet.JspServlet", "*.jsp");
  context.addHandler(sh);
  context.addHandler(new SessionHandler());

  server = new Server();
  server.addHandler(context);

  conf = new Configuration();
  conf.addResource("nutch-default.xml");
  conf.addResource("nutch-site-test.xml");

  http = new Http();
  http.setConf(conf);
}
 
开发者ID:jorcox,项目名称:GeoCrawler,代码行数:22,代码来源:TestProtocolHttpClient.java

示例3: JettyHttpServer

import org.mortbay.jetty.Server; //导入方法依赖的package包/类
public JettyHttpServer(URL url, final HttpHandler handler){
    super(url, handler);
    DispatcherServlet.addHttpHandler(url.getPort(), handler);
    
    int threads = url.getParameter(Constants.THREADS_KEY, Constants.DEFAULT_THREADS);
    QueuedThreadPool threadPool = new QueuedThreadPool();
    threadPool.setDaemon(true);
    threadPool.setMaxThreads(threads);
    threadPool.setMinThreads(threads);

    SelectChannelConnector connector = new SelectChannelConnector();
    if (! url.isAnyHost() && NetUtils.isValidLocalHost(url.getHost())) {
        connector.setHost(url.getHost());
    }
    connector.setPort(url.getPort());

    server = new Server();
    server.setThreadPool(threadPool);
    server.addConnector(connector);
    
    ServletHandler servletHandler = new ServletHandler();
    ServletHolder servletHolder = servletHandler.addServletWithMapping(DispatcherServlet.class, "/*");
    servletHolder.setInitOrder(2);
    
    server.addHandler(servletHandler);
    
    try {
        server.start();
    } catch (Exception e) {
        throw new IllegalStateException("Failed to start jetty server on " + url.getAddress() + ", cause: "
                                        + e.getMessage(), e);
    }
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:34,代码来源:JettyHttpServer.java

示例4: start

import org.mortbay.jetty.Server; //导入方法依赖的package包/类
public void start() {
    String serverPort = ConfigUtils.getProperty(JETTY_PORT);
    int port;
    if (serverPort == null || serverPort.length() == 0) {
        port = DEFAULT_JETTY_PORT;
    } else {
        port = Integer.parseInt(serverPort);
    }
    connector = new SelectChannelConnector();
    connector.setPort(port);
    ServletHandler handler = new ServletHandler();
    
    String resources = ConfigUtils.getProperty(JETTY_DIRECTORY);
    if (resources != null && resources.length() > 0) {
        FilterHolder resourceHolder = handler.addFilterWithMapping(ResourceFilter.class, "/*", Handler.DEFAULT);
        resourceHolder.setInitParameter("resources", resources);
    }
    
    ServletHolder pageHolder = handler.addServletWithMapping(PageServlet.class, "/*");
    pageHolder.setInitParameter("pages", ConfigUtils.getProperty(JETTY_PAGES));
    pageHolder.setInitOrder(2);
    
    Server server = new Server();
    server.addConnector(connector);
    server.addHandler(handler);
    try {
        server.start();
    } catch (Exception e) {
        throw new IllegalStateException("Failed to start jetty server on " + NetUtils.getLocalHost() + ":" + port + ", cause: " + e.getMessage(), e);
    }
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:32,代码来源:JettyContainer.java

示例5: getServer

import org.mortbay.jetty.Server; //导入方法依赖的package包/类
/**
 * Creates a new JettyServer with one static root context
 * 
 * @param port
 *          port to listen to
 * @param staticContent
 *          folder where static content lives
 * @throws UnknownHostException
 */
public static Server getServer(int port, String staticContent)
    throws UnknownHostException {
  Server webServer = new org.mortbay.jetty.Server();
  SocketConnector listener = new SocketConnector();
  listener.setPort(port);
  listener.setHost("127.0.0.1");
  webServer.addConnector(listener);
  ContextHandler staticContext = new ContextHandler();
  staticContext.setContextPath("/");
  staticContext.setResourceBase(staticContent);
  staticContext.addHandler(new ResourceHandler());
  webServer.addHandler(staticContext);
  return webServer;
}
 
开发者ID:jorcox,项目名称:GeoCrawler,代码行数:24,代码来源:CrawlDBTestUtil.java

示例6: main

import org.mortbay.jetty.Server; //导入方法依赖的package包/类
public static void main(String[] args) {
    Server server = new Server();
    SocketConnector connector = new SocketConnector();

    // Set some timeout options to make debugging easier.
    connector.setMaxIdleTime(1000 * 60 * 60);
    connector.setSoLingerTime(-1);
    connector.setPort(9080);
    server.setConnectors(new Connector[]{connector});

    WebAppContext context = new WebAppContext();
    context.setServer(server);
    context.setContextPath("/");

    ProtectionDomain protectionDomain = Main.class.getProtectionDomain();
    URL location = protectionDomain.getCodeSource().getLocation();
    context.setWar(location.toExternalForm());

    server.addHandler(context);
    try {
        server.start();
        System.in.read();
        server.stop();
        server.join();
    } catch (Exception e) {
        e.printStackTrace();
        System.exit(100);
    }
}
 
开发者ID:nkasvosve,项目名称:beyondj,代码行数:30,代码来源:WebLauncher.java

示例7: start

import org.mortbay.jetty.Server; //导入方法依赖的package包/类
public void start() {
    String serverPort = ConfigUtils.getProperty(JETTY_PORT);
    int port;
    if (serverPort == null || serverPort.length() == 0) {
        port = DEFAULT_JETTY_PORT;
    } else {
        port = Integer.parseInt(serverPort);
    }
    connector = new SelectChannelConnector();
    
    connector.setPort(port);
    ServletHandler handler = new ServletHandler();
    
    String resources = ConfigUtils.getProperty(JETTY_DIRECTORY);
    if (resources != null && resources.length() > 0) {
        FilterHolder resourceHolder = handler.addFilterWithMapping(ResourceFilter.class, "/*", Handler.DEFAULT);
        resourceHolder.setInitParameter("resources", resources);
    }
    
    ServletHolder pageHolder = handler.addServletWithMapping(PageServlet.class, "/*");
    pageHolder.setInitParameter("pages", ConfigUtils.getProperty(JETTY_PAGES));
    pageHolder.setInitOrder(2);
    
    Server server = new Server();
    server.addConnector(connector);
    server.addHandler(handler);
    try {
        server.start();
    } catch (Exception e) {
        throw new IllegalStateException("Failed to start jetty server on " + NetUtils.getLocalHost() + ":" + port + ", cause: " + e.getMessage(), e);
    }
}
 
开发者ID:spccold,项目名称:dubbo-comments,代码行数:33,代码来源:JettyContainer.java

示例8: createHttpFSServer

import org.mortbay.jetty.Server; //导入方法依赖的package包/类
private void createHttpFSServer() throws Exception {
  File homeDir = TestDirHelper.getTestDir();
  Assert.assertTrue(new File(homeDir, "conf").mkdir());
  Assert.assertTrue(new File(homeDir, "log").mkdir());
  Assert.assertTrue(new File(homeDir, "temp").mkdir());
  HttpFSServerWebApp.setHomeDirForCurrentThread(homeDir.getAbsolutePath());

  File secretFile = new File(new File(homeDir, "conf"), "secret");
  Writer w = new FileWriter(secretFile);
  w.write("secret");
  w.close();

  //FileSystem being served by HttpFS
  String fsDefaultName = getProxiedFSURI();
  Configuration conf = new Configuration(false);
  conf.set(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY, fsDefaultName);
  conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_ACLS_ENABLED_KEY, true);
  conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_XATTRS_ENABLED_KEY, true);
  File hdfsSite = new File(new File(homeDir, "conf"), "hdfs-site.xml");
  OutputStream os = new FileOutputStream(hdfsSite);
  conf.writeXml(os);
  os.close();

  //HTTPFS configuration
  conf = new Configuration(false);
  conf.set("httpfs.proxyuser." + HadoopUsersConfTestHelper.getHadoopProxyUser() + ".groups",
           HadoopUsersConfTestHelper.getHadoopProxyUserGroups());
  conf.set("httpfs.proxyuser." + HadoopUsersConfTestHelper.getHadoopProxyUser() + ".hosts",
           HadoopUsersConfTestHelper.getHadoopProxyUserHosts());
  conf.set("httpfs.authentication.signature.secret.file", secretFile.getAbsolutePath());
  File httpfsSite = new File(new File(homeDir, "conf"), "httpfs-site.xml");
  os = new FileOutputStream(httpfsSite);
  conf.writeXml(os);
  os.close();

  ClassLoader cl = Thread.currentThread().getContextClassLoader();
  URL url = cl.getResource("webapp");
  WebAppContext context = new WebAppContext(url.getPath(), "/webhdfs");
  Server server = TestJettyHelper.getJettyServer();
  server.addHandler(context);
  server.start();
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:43,代码来源:BaseTestHttpFSWith.java

示例9: createHttpFSServer

import org.mortbay.jetty.Server; //导入方法依赖的package包/类
private void createHttpFSServer(boolean addDelegationTokenAuthHandler)
  throws Exception {
  File homeDir = TestDirHelper.getTestDir();
  Assert.assertTrue(new File(homeDir, "conf").mkdir());
  Assert.assertTrue(new File(homeDir, "log").mkdir());
  Assert.assertTrue(new File(homeDir, "temp").mkdir());
  HttpFSServerWebApp.setHomeDirForCurrentThread(homeDir.getAbsolutePath());

  File secretFile = new File(new File(homeDir, "conf"), "secret");
  Writer w = new FileWriter(secretFile);
  w.write("secret");
  w.close();

  //HDFS configuration
  File hadoopConfDir = new File(new File(homeDir, "conf"), "hadoop-conf");
  hadoopConfDir.mkdirs();
  String fsDefaultName = TestHdfsHelper.getHdfsConf().get(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY);
  Configuration conf = new Configuration(false);
  conf.set(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY, fsDefaultName);
  conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_ACLS_ENABLED_KEY, true);
  conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_XATTRS_ENABLED_KEY, true);
  File hdfsSite = new File(hadoopConfDir, "hdfs-site.xml");
  OutputStream os = new FileOutputStream(hdfsSite);
  conf.writeXml(os);
  os.close();

  //HTTPFS configuration
  conf = new Configuration(false);
  if (addDelegationTokenAuthHandler) {
   conf.set("httpfs.authentication.type",
            HttpFSKerberosAuthenticationHandlerForTesting.class.getName());
  }
  conf.set("httpfs.services.ext", MockGroups.class.getName());
  conf.set("httpfs.admin.group", HadoopUsersConfTestHelper.
    getHadoopUserGroups(HadoopUsersConfTestHelper.getHadoopUsers()[0])[0]);
  conf.set("httpfs.proxyuser." + HadoopUsersConfTestHelper.getHadoopProxyUser() + ".groups",
           HadoopUsersConfTestHelper.getHadoopProxyUserGroups());
  conf.set("httpfs.proxyuser." + HadoopUsersConfTestHelper.getHadoopProxyUser() + ".hosts",
           HadoopUsersConfTestHelper.getHadoopProxyUserHosts());
  conf.set("httpfs.authentication.signature.secret.file", secretFile.getAbsolutePath());
  conf.set("httpfs.hadoop.config.dir", hadoopConfDir.toString());
  File httpfsSite = new File(new File(homeDir, "conf"), "httpfs-site.xml");
  os = new FileOutputStream(httpfsSite);
  conf.writeXml(os);
  os.close();

  ClassLoader cl = Thread.currentThread().getContextClassLoader();
  URL url = cl.getResource("webapp");
  WebAppContext context = new WebAppContext(url.getPath(), "/webhdfs");
  Server server = TestJettyHelper.getJettyServer();
  server.addHandler(context);
  server.start();
  if (addDelegationTokenAuthHandler) {
    HttpFSServerWebApp.get().setAuthority(TestJettyHelper.getAuthority());
  }
}
 
开发者ID:yncxcw,项目名称:big-c,代码行数:57,代码来源:TestHttpFSServer.java

示例10: createHttpFSServer

import org.mortbay.jetty.Server; //导入方法依赖的package包/类
/**
 * Create an HttpFS Server to talk to the MiniDFSCluster we created.
 * @throws Exception
 */
private void createHttpFSServer() throws Exception {
  File homeDir = TestDirHelper.getTestDir();
  Assert.assertTrue(new File(homeDir, "conf").mkdir());
  Assert.assertTrue(new File(homeDir, "log").mkdir());
  Assert.assertTrue(new File(homeDir, "temp").mkdir());
  HttpFSServerWebApp.setHomeDirForCurrentThread(homeDir.getAbsolutePath());

  File secretFile = new File(new File(homeDir, "conf"), "secret");
  Writer w = new FileWriter(secretFile);
  w.write("secret");
  w.close();

  // HDFS configuration
  File hadoopConfDir = new File(new File(homeDir, "conf"), "hadoop-conf");
  if ( !hadoopConfDir.mkdirs() ) {
    throw new IOException();
  }

  String fsDefaultName =
          nnConf.get(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY);
  Configuration conf = new Configuration(false);
  conf.set(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY, fsDefaultName);

  // Explicitly turn off XAttr support
  conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_XATTRS_ENABLED_KEY, false);

  File hdfsSite = new File(hadoopConfDir, "hdfs-site.xml");
  OutputStream os = new FileOutputStream(hdfsSite);
  conf.writeXml(os);
  os.close();

  // HTTPFS configuration
  conf = new Configuration(false);
  conf.set("httpfs.hadoop.config.dir", hadoopConfDir.toString());
  conf.set("httpfs.proxyuser." +
                  HadoopUsersConfTestHelper.getHadoopProxyUser() + ".groups",
          HadoopUsersConfTestHelper.getHadoopProxyUserGroups());
  conf.set("httpfs.proxyuser." +
                  HadoopUsersConfTestHelper.getHadoopProxyUser() + ".hosts",
          HadoopUsersConfTestHelper.getHadoopProxyUserHosts());
  conf.set("httpfs.authentication.signature.secret.file",
          secretFile.getAbsolutePath());

  File httpfsSite = new File(new File(homeDir, "conf"), "httpfs-site.xml");
  os = new FileOutputStream(httpfsSite);
  conf.writeXml(os);
  os.close();

  ClassLoader cl = Thread.currentThread().getContextClassLoader();
  URL url = cl.getResource("webapp");
  if ( url == null ) {
    throw new IOException();
  }
  WebAppContext context = new WebAppContext(url.getPath(), "/webhdfs");
  Server server = TestJettyHelper.getJettyServer();
  server.addHandler(context);
  server.start();
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:63,代码来源:TestHttpFSServerNoXAttrs.java

示例11: deployWebApp

import org.mortbay.jetty.Server; //导入方法依赖的package包/类
private void deployWebApp() {
    try {
        Server server = new Server();
        SelectChannelConnector connector = new SelectChannelConnector();
        connector.setMaxIdleTime(MAX_IDLE_TIME_MILLIS);
        connector.setHeaderBufferSize(HEADER_BUFFER_SIZE);
        connector.setHost(getHost());
        connector.setPort(getPort());
        if (isHttpsEnabled()) {
            connector.setConfidentialPort(getHttpsPort());
        }
        server.addConnector(connector);

        if (isHttpsEnabled()) {
            SslSocketConnector sslConnector = new SslSocketConnector();
            sslConnector.setMaxIdleTime(MAX_IDLE_TIME_MILLIS);
            sslConnector.setHeaderBufferSize(HEADER_BUFFER_SIZE);
            sslConnector.setHost(getHost());
            sslConnector.setPort(getHttpsPort());
            sslConnector.setKeystore(System.getProperty("subsonic.ssl.keystore", getClass().getResource("/subsonic.keystore").toExternalForm()));
            sslConnector.setPassword(System.getProperty("subsonic.ssl.password", "subsonic"));
            server.addConnector(sslConnector);
        }

        WebAppContext context = new WebAppContext();
        context.setTempDirectory(getJettyDirectory());
        context.setContextPath(getContextPath());
        context.setWar(getWar());
        context.setOverrideDescriptor("/web-jetty.xml");

        if (isHttpsEnabled()) {

            // Allow non-https for streaming and cover art (for Chromecast, UPnP, Sonos etc)
            context.getSecurityHandler().setConstraintMappings(new ConstraintMapping[]{
                    createConstraintMapping("/stream", Constraint.DC_NONE),
                    createConstraintMapping("/coverArt.view", Constraint.DC_NONE),
                    createConstraintMapping("/ws/*", Constraint.DC_NONE),
                    createConstraintMapping("/sonos/*", Constraint.DC_NONE),
                    createConstraintMapping("/", Constraint.DC_CONFIDENTIAL)
            });
        }

        server.addHandler(context);
        server.start();

        System.err.println("Subsonic running on: " + getUrl());
        if (isHttpsEnabled()) {
            System.err.println("                and: " + getHttpsUrl());
        }

    } catch (Throwable x) {
        x.printStackTrace();
        exception = x;
    }
}
 
开发者ID:sindremehus,项目名称:subsonic,代码行数:56,代码来源:SubsonicDeployer.java

示例12: createHttpFSServer

import org.mortbay.jetty.Server; //导入方法依赖的package包/类
/**
 * Create an HttpFS Server to talk to the MiniDFSCluster we created.
 * @throws Exception
 */
private void createHttpFSServer() throws Exception {
  File homeDir = TestDirHelper.getTestDir();
  Assert.assertTrue(new File(homeDir, "conf").mkdir());
  Assert.assertTrue(new File(homeDir, "log").mkdir());
  Assert.assertTrue(new File(homeDir, "temp").mkdir());
  HttpFSServerWebApp.setHomeDirForCurrentThread(homeDir.getAbsolutePath());

  File secretFile = new File(new File(homeDir, "conf"), "secret");
  Writer w = new FileWriter(secretFile);
  w.write("secret");
  w.close();

  // HDFS configuration
  File hadoopConfDir = new File(new File(homeDir, "conf"), "hadoop-conf");
  if ( !hadoopConfDir.mkdirs() ) {
    throw new IOException();
  }

  String fsDefaultName =
          nnConf.get(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY);
  Configuration conf = new Configuration(false);
  conf.set(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY, fsDefaultName);

  // Explicitly turn off ACLs, just in case the default becomes true later
  conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_ACLS_ENABLED_KEY, false);

  File hdfsSite = new File(hadoopConfDir, "hdfs-site.xml");
  OutputStream os = new FileOutputStream(hdfsSite);
  conf.writeXml(os);
  os.close();

  // HTTPFS configuration
  conf = new Configuration(false);
  conf.set("httpfs.hadoop.config.dir", hadoopConfDir.toString());
  conf.set("httpfs.proxyuser." +
                  HadoopUsersConfTestHelper.getHadoopProxyUser() + ".groups",
          HadoopUsersConfTestHelper.getHadoopProxyUserGroups());
  conf.set("httpfs.proxyuser." +
                  HadoopUsersConfTestHelper.getHadoopProxyUser() + ".hosts",
          HadoopUsersConfTestHelper.getHadoopProxyUserHosts());
  conf.set("httpfs.authentication.signature.secret.file",
          secretFile.getAbsolutePath());

  File httpfsSite = new File(new File(homeDir, "conf"), "httpfs-site.xml");
  os = new FileOutputStream(httpfsSite);
  conf.writeXml(os);
  os.close();

  ClassLoader cl = Thread.currentThread().getContextClassLoader();
  URL url = cl.getResource("webapp");
  if ( url == null ) {
    throw new IOException();
  }
  WebAppContext context = new WebAppContext(url.getPath(), "/webhdfs");
  Server server = TestJettyHelper.getJettyServer();
  server.addHandler(context);
  server.start();
}
 
开发者ID:yncxcw,项目名称:big-c,代码行数:63,代码来源:TestHttpFSServerNoACLs.java

示例13: createHttpFSServer

import org.mortbay.jetty.Server; //导入方法依赖的package包/类
private void createHttpFSServer() throws Exception {
  File homeDir = TestDirHelper.getTestDir();
  Assert.assertTrue(new File(homeDir, "conf").mkdir());
  Assert.assertTrue(new File(homeDir, "log").mkdir());
  Assert.assertTrue(new File(homeDir, "temp").mkdir());
  HttpFSServerWebApp.setHomeDirForCurrentThread(homeDir.getAbsolutePath());

  File secretFile = new File(new File(homeDir, "conf"), "secret");
  Writer w = new FileWriter(secretFile);
  w.write("secret");
  w.close();

  //HDFS configuration
  File hadoopConfDir = new File(new File(homeDir, "conf"), "hadoop-conf");
  hadoopConfDir.mkdirs();
  String fsDefaultName = TestHdfsHelper.getHdfsConf()
    .get(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY);
  Configuration conf = new Configuration(false);
  conf.set(CommonConfigurationKeysPublic.FS_DEFAULT_NAME_KEY, fsDefaultName);
  File hdfsSite = new File(hadoopConfDir, "hdfs-site.xml");
  OutputStream os = new FileOutputStream(hdfsSite);
  conf.writeXml(os);
  os.close();

  conf = new Configuration(false);
  conf.set("httpfs.proxyuser.client.hosts", "*");
  conf.set("httpfs.proxyuser.client.groups", "*");

  conf.set("httpfs.authentication.type", "kerberos");

  conf.set("httpfs.authentication.signature.secret.file",
           secretFile.getAbsolutePath());
  File httpfsSite = new File(new File(homeDir, "conf"), "httpfs-site.xml");
  os = new FileOutputStream(httpfsSite);
  conf.writeXml(os);
  os.close();

  ClassLoader cl = Thread.currentThread().getContextClassLoader();
  URL url = cl.getResource("webapp");
  WebAppContext context = new WebAppContext(url.getPath(), "/webhdfs");
  Server server = TestJettyHelper.getJettyServer();
  server.addHandler(context);
  server.start();
  HttpFSServerWebApp.get().setAuthority(TestJettyHelper.getAuthority());
}
 
开发者ID:yncxcw,项目名称:big-c,代码行数:46,代码来源:TestHttpFSWithKerberos.java


注:本文中的org.mortbay.jetty.Server.addHandler方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。