Я заполнил свое приложение на локальном хосте и работает нормально, но у меня возникают проблемы при загрузке на сервер.
вот мой локальный код для ajax, и он работает нормально.
$.ajax({
type: "get",
url: "http://localhost:8080/Certificates/ViewCertificates",
dataType: "JSON",
success: function (data) {
console.log(data);
}
});
but when am upload to my domain and change url to example
http://example.com/Certificates/ViewCertificates
it gives me 404 error on the ajax call. i have tried many solutions that are given on stackoverflow and other platforms but none of them is giving me success.
here is my web.xml mapping
<servlet>
<servlet-name>ViewCertificates</servlet-name>
<servlet-class>Controller.ViewCertificates</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ViewCertificates</servlet-name>
<url-pattern>/ViewCertificates</url-pattern>
</servlet-mapping>
it will be highly appreciated if anyone can give me hint or a link which i can read to solve this out.