Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

user session expired error at first time but running fine after that

$
0
0
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,
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.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>