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.

New Topic/Question
Reply



MultiQuote


|