$(document).ready(function () {
$(".linkDelete").click(function () {
var userid = $(this).attr("id");
console.debug("saurabh userid", userid);
var url = "/delete?id=" + userid;
var s = "SpringHibernateAnnotations";
console.debug("saurabh url", url);
$.ajax({
url: s + "/delete?id=" + userid,
success: function (data) {
$('#result').html(data);
}
});
});
});
i have this jquery ajax function which is generating this url GET http://localhost:8080/SpringHibernateAnnotations/SpringHibernateAnnotations/delete?id=253 404 (Not Found) instead it should generate http://localhost:8080/SpringHibernateAnnotations/delete?id=253 404 and if i remove var s= "SpringHibernateAnnotations"; and keep my url in ajax method as url : "/delete?id="+userid, it generates http://localhost:8080/delete?id=253 because of which i am not able to enter into application.So how can i generate this proper url http://localhost:8080/SpringHibernateAnnotations/delete?id=253