I use Spring MVC and Javascript/ajax. I have an issue with the way my ajax scripts refer to a server-side resource.
Say I have two pages that need to use the same server-side resource through ajax:
The url for the first page is:
/myapp/advertisement/28/edit
/myapp/signup
Say the server-side resource that my ajax script need to use is:
/myapp/geolocation/addressAutocomplete
As of now, I have hard-coded the application context path i.e. /myapp
in my ajax script.
If and when my application context path changes I need to update is all over my scripts.
Is there a solution to that?