Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
97 views
in Technique[技术] by (71.8m points)

java - How do I use Comet with Spring MVC?

I'd like to add some Comet/server push capabilities to a simple web application. I'm having trouble finding up to date information on how to do this.

Can anyone point me to some examples, tutorials, blogs, or anything recent that walks you through using Comet with Spring MVC?

In case it matters, I'm using Freemarker to render the views, and JQuery for the JavaScript framework.

Aside: I already know all about Lift and its awesome Comet support built-in. This app is a proof of concept that I've already implemented using Lift. Now I'm building it with Spring MVC to compare and contrast.

Edit: I've started trying out DWR. It's not fantastic, but I can make something that works. I also checked out Atmosphere, but I couldn't get any traction with it at all.

I'm leaving the question open. Hopefully some better suggestions will come in.

question from:https://stackoverflow.com/questions/4456357/how-do-i-use-comet-with-spring-mvc

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Atmosphere is really the best I've seen (I haven't used any, but I've evaluated multiple solutions). The good thing with it is that it uses the best mechanism available. If running on servlet 3.0 - using the async support. If using jetty - using its support, and so on. It also has spring integration.

So, perhaps you should ask a concrete question about atmosphere. See this and this related questions.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...