Creating Webserver Embedded in Plugin?

Discussion in 'Plugin Development' started by fuggles7, Apr 2, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    fuggles7

    I've seen other plugins such as Dynmap that have a built-in Webserver inside of the plugin. I would like to ask what library I should use to implement this. I want to make sure that they user does not have to install any exterior libraries to run the plugin.
     
  2. Offline

    IceReaper

    com.sun.net.httpserver.HttpServer might be what you want.

    HttpServer server = HttpServer.create(new InetSocketAddress(80), 0);
    server.createContext("/", new SMHttpHandler(myHandler));
    server.setExecutor(null);
    server.start();
     
Thread Status:
Not open for further replies.

Share This Page