I am sending an email-id to server as a path variable as:
@RequestMapping(value = "/resetPassword/{email:.+}", method = RequestMethod.GET)
public @ResponseBody MyResponse resetPassword(HttpServletRequest request, @PathVariable("email") String email)
{
MyResponse res = new MyResponse();
res.setMsg("some Text");
return res;
}
and I am calling the method by jQuery as:
var email = $("#fpusername").val();
$.ajax({
type : "GET",
url : "./useraccount/resetPassword/" + email,
dataType : "json",
async : true,
success : function(data) {
alert(data.msg);
}
});
The same method is working when I am sending myname@gmail
as the email
value but getting the below error when sending myname@gmail.com
406 [The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers]