【问题标题】:Getting GWT and Grails with Atmosphere plugin to work together使用 Atmosphere 插件让 GWT 和 Grails 协同工作
【发布时间】:2011-11-07 19:09:38
【问题描述】:

我能够成功启动并运行 GWT Atmosphere 演示项目以及 Grails 氛围项目。但是,当使用 Grails 后端启动 GWT Atmosphere 客户端时,它会停止工作并显示以下消息:

comet.beforeDisconnected
comet.disconnected
comet.error [connected=false] (0)0
comet.error [connected=true] (-1)Invalid message received: <!--   ---------------------------------------------------------------- http://github.com/Atmosphere ------------------------------------------------------------------------ -->
comet.beforeDisconnected
comet.error [connected=true] (-1)Expecting disconnection but received message: <!-- Welcome to the Atmosphere Framework. To work with all the browsers when suspending connection, Atmosphere must output some data to makes WebKit based browser working.-->

有什么建议吗?

【问题讨论】:

    标签: gwt grails comet websocket atmosphere


    【解决方案1】:

    你有更多可用的输出吗?也许是个例外?

    广播消息时会发生这种情况吗?也许您已将暂停的连接配置为在广播时恢复。

    可能问题出在收到的消息上。您可以尝试在挂起时停用写入消息,例如:

    新的 SuspendResponse.SuspendResponseBuilderString... .outputComments(false) ... .build()

    【讨论】:

    • 问题似乎是协议和 grails 2 的一些有趣问题
    【解决方案2】:

    一切都是为了正确配置 CometHandler。它仍然没有像我们预期的那样工作,但它至少与手动注入 AtmosphereServlet 的工作方式相同

    【讨论】:

      猜你喜欢
      • 2013-09-23
      • 2016-06-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-28
      • 2011-09-25
      相关资源
      最近更新 更多