Q:

Is it possible to submit a form and send an ajax request at the same time jquery

I'd like to submit a form and, at the same time, send an ajax request to my Spring MVC Server. For it I have a form like this:
<form id='confirma' method='post' action='confirma'>
  <button type='submit' id='save' class='btn btn-success' value='Save'>Enviar</button>
</form>

In my server, I would have two methods to receive both requests (the ajax request and the normal form submission). 
// receive from form
@RequestMapping("fromForm")
public String fromForm(Model model)
{    
   // get atb1 values from database
   model.addAttribute("atb1", atb1);

   return "file.jsp";    
}

// receive from ajax
@RequestMapping("fromAjax")
public void fromAjax(String jsonData)
{    
   // deserialize json Data and insert it on database
   System.out.println("data received!");        
}

My intention is to receive the data from the Ajax request, save it in database, and get this data in the form submission method, called, in this example, fromForm. 
I know this might look crazy but I'm doing this because I have a sequence of submit forms and I'd like to make them independent from each other so I could call any of them without have passed the data from the previously form. 
I have tried to deal with it by using jQuery. So this is what I've done:
function ajaxRequest() {  
    var jsonArray = new Array();

    // Complete the jsonArray with an Array of objects created by myself

    $.ajax({
        url: "fromAjax",
        cache: false,
        contentType: false,
        processData: false,
        data: JSON.stringify(jsonArray, null, 4),
        type: 'POST',
        success: function (data, textStatus, jqXHR) {
               console.log("success ajax");
               return true;
        },
        error: function (xhr, status, error) {
               console.log("error ajax");
               return false;
        }
    });
}
$(document).on('submit', '#confirma', function(event) {
    event.preventDefault();
    // by return this method, I would just call the another jsp page, if the ajax              
    // request is completed successfully 
    return ajaxRequest();
});

This is not working though.. If I remove the event.preventDefault in the form submission, I only receive the form submission on the server. If I have the event.preventDefault call, only the ajax request hits the server.
How can I make both of the requests hit the server?

A:

Think of this from the browser's perspective. Imagine that it has successfully fired both a XmlHttpRequest to /fromAjax and a regular form submission POST to /confirma. Now imagine that the server responds to the POST /confirma first. What is the browser to do when the form submission response contains a new HTML page to display, or is a redirect to another page - what should the browser do with the (still pending) XmlHttpRequest?
Or if you look at it from the server's perspective - what should happen when the server processes the request to your fromForm() method before it has received or begin to process the request to the fromAjax() method?
If your intention is to

receive the data from the Ajax request, save it in database, and get this data in the form submission method

then I would first send the ajax request and then when you receive the response, trigger the form submission from Javascript, so that these requests happen serially (one after the other) rather than in parallel.

