Oct 26, 2010, 6:30:28 AM10/26/10
I'm doing development work for a web app using jmvc3. My app will use
ajax to fetch data from a server. The design will have these remote
resources coming from a domain different from the app itself. So,
we'll use a browser that supports CORS and have the remote server also
providing that support.
In development mode, I point my browser to a file:/// url of the app.
It then calls ajax to a remote server which returns data in json.
this error when it tries to render a view:
XMLHttpRequest cannot load file:///Users/hau/lab/jmvc3/myapp/views/reading/page.ejs.
Origin null is not allowed by Access-Control-Allow-Origin.
I did some search on the web and it looks like the reason of this
error is because the app is served at a file:/// url. Supposedly this
can be solved by access the app at a http url.
So, my question is: how can a jmvc3 app in development mode be
deployed on a web server? I'd appreciate anyone's sharing some
success stories on this. It would be even better if the web server is
a rails app, i.e. rails app; app/script/server to bring up the