I’m trying to create a Java server for a REST API and following this question I used jersey’s JdkHttpServer. I imported the necessary jars (from here), but when I start the server the following error appears: My code is the following: And in PokerResource I’ve got all the paths for the API. Am I missing some import or do I
Tag: httpserver
How to configure com.sun.net.httpserver to accept only requests from localhost?
I am using the com.sun.net.httpserver.HttpServer to handle some http requests. My http server runs behind nginx that maps the server domain names and forward the requests to my server by using it as a proxy running at a certain port. My http server takes all requests if they access the port where the server is running. I want a mechnism