Java class for embedded HTTP server in Swing app

后端 未结 5 1628
被撕碎了的回忆
被撕碎了的回忆 2020-12-04 12:22

I wish to embed a very light HTTP server in my Java Swing app which just accepts requests, performs some actions, and returns the results.

Is there a very light Java

5条回答
  •  感情败类
    2020-12-04 12:56

    You can use jetty as embedded server, its fairly light weight. Other option is check this out for a simple java class to handle http requests http://java.sun.com/developer/technicalArticles/Networking/Webserver/.

    Other way is in Java 6 you can use com.sun.net.httpserver.HttpServer

提交回复
热议问题