用于ajax请求的Java服务器
我必须开始使用 java 开发一个服务器,它必须与 ajax 良好地通信(每隔几秒),但不仅仅是与它。我读了很多文章,但我有点困惑,因为存在不同技术的丛林。哪个是最好的选择?你能给我建议一个起点吗?
I have to start to develop a server, using java, that have to communicate (every few second) well with ajax but not only with it. I read a lot of articles but i'm bit confused because there 's a jungle of different technologies. which is the best choice? Could you suggest me a point of start?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从服务器的角度来看,ajax 请求只是另一个请求,并且很有可能,服务器甚至不知道请求是否是 ajax 请求。因此,选择的任何网络服务器都应该足以满足您的需求。例如jetty、tomcat等。
From a server's point of view, an ajax request is just another request, and in good possibility, the server wouldn't even know whether a request was an ajax-request. Hence any web-server of choice should suffice your cause. For e.g. jetty, tomcat, etc.
只是一些提示:使用 Jetty,它既是 WebServer 又是 ServletContainer(它也非常适合对于彗星)。然后,查找有关 Servlet 的教程。您必须在客户端使用纯 HTML/CSS/Ajax 吗?如果没有,请查看 Google Web Toolkit。
编辑
开发服务器是什么意思?我敢打赌你的意思是开发服务。
Just a few hints: Use Jetty, which is both a WebServer and a ServletContainer (it is also well suited for comet). Then, look for tutorials about Servlets. Do you have to use plain HTML/CSS/Ajax on the clientside? If not, have a look at Google Web Toolkit.
EDIT
What do you mean by Develop a Server? I would bet what you meant was developing a Service.