In my client, I send a request using ajax to a Spring controller. This last can intercept it, but when I return a value, I can't can't have it in my client side.
Client code :
$.ajax({
type: "GET",
data: {name : "name"},
url: "/web/private/frontend/accueil/dateHistorique.html",
success: function(msg){
alert("Hello");
}
});
Server side code :
@RequestMapping(value="/dateHistorique.html", method = RequestMethod.GET)
public @ResponseBody Map<String, String> getAllowedDate(@RequestParam String name) {
System.out.println("***********************************" + name);
AllowedDates allowedDates = new AllowedDates("1","20");
Map<String, String> responseMap = new HashMap<String, String>();
responseMap.put("Name", "Marouane");
return responseMap;
}
I can see the out put in the server : ********name but always don't have a response. Thnx