URL formation for Ajax request in struts.
Hi all
I am building an struts application and using ajax also. I have observed that request url for making ajax request is slightly different.
for example in a normal jsp application the url will be like below
var url = "/authenticate"
but is struts its
var url = "TestCaseRepo/authenticate.do"
I think this is not the right way since we are hard coding the root directory path. If tomorrrow if i deploy in another folder instead of TestCaseRepo then i have to change the url in all the locations in my struts application which is not really good.
I would great if someone could tell me how to resolve this issue, so that my application work if deployed on any folder.