Replacement for DWR [closed]

有些话、适合烂在心里 提交于 2019-12-11 04:35:21

问题


DWR is mainly used for handling AJAX responses from server..

So i wanted to know other similar technologies, which would make AJAX handling easy like calling a Java method from within Javascript and pasting the response in html code.

I know jQuery has AJAX methods, but so not think it can call and handle specific Java methods.


回答1:


I know jQuery has AJAX methods, but so not think it can call and handle specific Java methods

I use spring with jquery, each request can be mapped to a specific method. I prefer it over dwr.

Ajax and Spring.




回答2:


You can give Google Web Toolkit a try, at this point it's mature enough to have all the decent features and no annoying bugs:

http://code.google.com/intl/fr-FR/webtoolkit/

Now GWT is not a straight out replacement for DWR. It's default usage is to have everything coded in Java (client UI and server side). This might be something prefferable to DWR's way of doing things. However if it's not, and you'd like to use GWT in a fashion more similar to DWR, you can have your javascript code / functions and your GWT Java classes, and you can call js functions from Java via GWT's JSNI API:

http://code.google.com/intl/fr-FR/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI.html




回答3:


You can use JSON-RPC



来源:https://stackoverflow.com/questions/7544362/replacement-for-dwr

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