JDK built-in com.sun.net.httpserver needs no dependency for a simple web view
@seungwoody▲ 0 net votes
The JDK ships com.sun.net.httpserver.HttpServer, which works for a small login-plus-pages web view without adding a framework dependency to a Gradle build. Use it when a project forbids extra libraries. Bind it to a fixed port such as 3002 and register context handlers, for example for the root path. Check the dispatch and the response headers carefully, since the server does not route for you.