不使用web服务器部署java web服务 [英] Deploy java web service without using web server
问题描述
可以将我自己创建的 Web 服务部署到任何 PC 上,而无需安装任何 Web 服务器应用程序,例如:tomcat?我想让它像任何 PC 中的代理/插件一样.为了访问网络服务,我只需要访问 http://:8080/web_service.对此有什么建议吗?
It is possible to deploy my own created web service to any of PC without installing any web server app eg:tomcat? I want make it like agent/plug-in in any PC. In order to access the web services i only need to access http://:8080/web_service. Any suggestion about this?
推荐答案
即使比运行 Jetty 更轻量级,您也可以使用 Java 内置的 HttpServer.
Even lighter than running Jetty you can use the HttpServer built into Java.
您需要编写自己的代码来解析请求数据,但这当然是可行的.
You'll need to write your own code for parsing request data but it's certainly doable.
http://blogs.operationaldynamics.com/andrew/software/free-java/sun-secret-webserver.html
这篇关于不使用web服务器部署java web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!