I have some jQuery code that looks like this:
$.post("/myapp/mycontroller/save", { myObject: JSON.stringify(jsonObject) })
.done(function(data) {
$("#successmsg").text(data);
$("#successmsg").show();
});
This all works fine on my local environment because name of my app when running on local environment is myapp
However, when I deploy to test environment, the name of the app is mytestapp
so this code fails to work on test environment.
How do I resolve this problem? How can I simply take out the app name?