I'm just wondering how to implement a small server program in Java SE?
The program listens on port 80 and is ready to retrieve the InputStream object, but is there any function I can use to convert the InputStream to an HttpRequest object (something like Servlet)?
After that, how can I create an HttpResponse object and send the data back to the browser?
In conclusion, I'm just looking for any infrastructure that can help me parse the HTTP format in an object or from an object into an HTTP response stream.
(I know Java EE will be the best solution, I just want to test something in Java SE)
GMsoF
source share