I need to build a simple HTTP server in Java using only the standard Java API. I found this question: simple HTTP server in Java using only Java SE API which has two answers that use only the standard Java API:
- One answer is to use the com.sun.net.httpserver package, but this package is not an official part of Java.
- Another answer is to use the javax.xml.ws package, but, according to the Java 9 documentation, this package is deprecated since Java 9.
So, what is the current official way to create a web-server?