1

我正在尝试从大气样本中运行聊天样本

但我在控制台中收到以下错误

GET http://localhost:8080/javascript/atmosphere.js 404 (Not Found)

当我查看源代码时,samples/chat我在代码中看不到大气.js。我猜这个文件应该来自一个大气罐?我期待看到它,src/main/webapp/javascript但事实并非如此。

我已经完成了以下步骤

  1. git checkout https://github.com/Atmosphere/atmosphere-samples.git从 git ( )结帐
  2. 切换到最新的稳定分支 ( git checkout atmosphere-samples-project-2.0.5)
  3. 在 Eclipse 中导入samples/chat为“现有的 maven 项目”(使用 m2e 插件)
  4. 设置码头运行目标(RunJettyRun)
  5. 在浏览器中访问http://localhost:8080/<context>

注意,我看到 webapp 正在运行,它只是因为 404 导致了 javascript 错误。

4

1 回答 1

3

maven 构建中似乎有一些魔法在 Eclipse 中没有被复制。我没有花时间去追查确切的原因,但我通过复制atmosphere.jsfrom的适当版本来解决我的问题

https://github.com/Atmosphere/atmosphere-javascript/blob/master/modules/javascript/src/main/webapp/javascript/atmosphere.js

src/main/webapp/javascript.

于 2013-12-21T15:34:42.137 回答