Question

I'm trying to get the chat sample running from atmosphere-samples

But I'm getting the following error in the console

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

When I look at the source for samples/chat I can't see atmosphere.js in the code. I'm guessing this file should be coming from one of the atmosphere jars? I was expecting to see it in src/main/webapp/javascript but it's not.

I've done the following steps

  1. Checkout from git (git checkout https://github.com/Atmosphere/atmosphere-samples.git)
  2. Switch to latest stable branch (git checkout atmosphere-samples-project-2.0.5)
  3. Import samples/chat as an "existing maven project" in eclipse (using m2e plugin)
  4. Setup jetty run target (RunJettyRun)
  5. Go to http://localhost:8080/<context> in a browser.

Note, I see the webapp running, it's just causing javascript errors because of the 404.

Was it helpful?

Solution

It seems like there's some magic going on in the maven build that's not being replicated in eclipse. I didn't take the time to track down the exact cause but I fixed my problem by copying an appropriate version of atmosphere.js from

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

to src/main/webapp/javascript.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top