How to proceed for making chat application using jsp's and servlets

吃可爱长大的小学妹 提交于 2020-01-15 10:55:08

问题


I developed a chat application using java.But now my challenge is build a chat app in web application.I dont how to proceed.Can we use sockets as done in java.

Please give me a suggestion to get through this.

Thanks in Advance.


回答1:


I recommend you to use websockets as they're really efficient to exchange in real time (push instead of pull) data between a server and html clients. They're bidirectionnal and roughly equivalent to the sockets you're used to (hence their name). Client-side, they use the same callback based logic than ajax clients but that doesn't mean they're not fast.

Here's a tutorial : http://java.dzone.com/articles/creating-websocket-chat

Googling "java chat websocket" would give you other results.



来源:https://stackoverflow.com/questions/12006094/how-to-proceed-for-making-chat-application-using-jsps-and-servlets

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