Well, if you have achieved this with simple java-script and AJAX, and I believe that it is no different from what you will do using jQuery. JQuery is no different from the fact that java-script is its library creating don java script to make the life of a developer happy.
You can submit your form using the jQuery post method and you can send a line from the server upon successful registration, something like
$.ajax({ type: 'POST', url: url, data: data, success: success, dataType: dataType });
For more precise control, I suggest you use the Struts2-Json plugin and the Jquery Json function to send data to the server and receive results from the server, something like
var formInput='val='+val; $.getJSON('myaction',formInput,function(data) { $.each(data.myData,function(index, value){ alert(index); }); });
See this lesson for more details.
source share