I have made an implementation of a localhosted webserver which works fine . My webserver expososes an EJB interface which clients can connect to and make calls . I also created a Java client that connects to this ejb interface and calls the exposed API's . The webserver accepts a JSON object and can parse it to send back a JSON response . All this works fine and is 100% java (which i know). I have made an implementation of a localhosted