Please help me with this ridiculous problem. I am passing a URL from my js form by using window.open() function that will hit a controller method and also some path variable is included.. that is,
getAuthTokenId() is written in my "global.js" file And in the controller I have written the method as
Now My problem is when first time the js is executing my call from js is not hitting the controller but next time onwards the controller is hit every time.
myUrl = "controller/"+pathVar1+"/"+pathVar2+"/controllerMethod?AUTH_TOKEN=" + getAuthTokenId() +"&"; window.open(myUrl,true);
getAuthTokenId() is written in my "global.js" file And in the controller I have written the method as
@Controller
@RequestMapping("/controller")
public class ControllerName{
@RequestMapping(value = "/{pathVar1}/{pathVar2}/controllerMethod", method = RequestMethod.GET)
public @ResponseBody void ControllerMethodDefinition(HttpServletRequest request, HttpServletResponse response, @PathVariable("pathVar1") String pathVar1,@PathVariable("pathVar2") String pathVar2){
/***/
}
}
Now My problem is when first time the js is executing my call from js is not hitting the controller but next time onwards the controller is hit every time.