Currently, I am utilizing apache-tomcat-7.0.67 and have deployed a JAR file within the webapps
folder with the name of:
Account
The WAR file was generated using Spring Boot, so there is no explicit definition of web.xml. However, the URL mapping has been specified using
@RequestMapping(value="/submitForm",method = RequestMethod.POST)
. Whenever I access this URL from tools like Postman or JMeter, such as http://localhost:8080/Account/submitForm
, the request successfully reaches the server and a response is returned. Currently, I have another directory that solely contains HTML files which are not present in the WAR file, similar to this https://i.sstatic.net/im3i5.png.
This directory hosts several HTML files that include AJAX calls using JavaScript like:
$.ajax({
type: 'POST',
url: '/Account/submitForm',
success: function (resp) {
console.log(resp);
},
error: function(e) {
console.log('Error: ',e);
}
});
However, even after attempting to send a request to the server using URL:
'http://localhost:8080/Account/submitForm'
, the request never seems to reach the server. Can someone kindly provide guidance on how to address this issue? I seem to be at an impasse.