服务器端事件处理使用servlet? [英] Server Side Event handling Using servlets?

查看:116
本文介绍了服务器端事件处理使用servlet?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我想知道我是否可以执行服务器端事件处理,例如我想检测服务器上的键盘或鼠标事件并将其通知客户端系统.我可以使用servlet来执行此操作,还是可以使用还有什么其他的.. plz帮助..

Hello i want to know if i can do server side event handling like for example i want to detect a keyboard or mouse event on the server and inform it to client system..can i do this using servlets ,or can i use anything else.. plz help..

推荐答案

可以做到这一点,但这将涉及大量流量和不必要的通信.
最大的问题是您将需要处理客户端的事件,以将其传递到服务器.
更好的方法是确定应该在哪个原子级别上传达客户端操作.例如,让事务处理字段中的输入,而仅调用服务器来验证数据.
You could do this but it would involve a lot of traffic and needless comunication.
The big problem is you''ll need to handle the events client side to pass them through to the server.
A better approach would be to decide at what atomic level you should be communicating client action. For example, let the cleint deal with input into fields and only call the server for validation of data.


这篇关于服务器端事件处理使用servlet?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆