Servlet and HttpServer

☆樱花仙子☆ 提交于 2019-12-11 18:36:40

问题


Short version: Is it possible to run from a HttpServer (com.sun.net.httpserver.HttpServer) a Servlet on a different port ?

Long version: I have a project in which I fire a HttpServer to handle client request and provide them REST endpoint and I would like to use a Servlet on a different port.

So basically my Servlet would act like a middleware between the user and the actual HttpServer, to communicate between both entity.

Is it possible ? If so does there's some documentation about that ?

来源:https://stackoverflow.com/questions/49152824/servlet-and-httpserver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!