javascript - State of Ajax request on response.getWriter().write() -
i have spring mvc webapp, have following controller
@resourcemapping("getpermission") @responsebody public modelandview getpermission(resourcerequest request, resourceresponse response){ . .do something.. . iterator<string> iterator = permissionlist.iterator(); while(iterator.hasnext()){ string perm = iterator.next(); if(perm.equalsignorecase("create")){ response.getwriter().write("true"); } } return null; }
and ajax request
$.ajax({ url:availableurls.permurl, success:function(result){ if(result=='true'){ something.. } } });
now when response.getwriter().write("true");
ajax request closed? or if permissionlist
has got more 2 values create
, write true
twice?
will request closed once write response or not confusion. support appreciated.
Comments
Post a Comment