As someone who is relatively new to programming, I kindly ask for your patience with me.
I am currently attempting to extract values from a form (embedded in a JSP) using JavaScript, and then make a post request to a servlet. The form consists of 6 different values, which I retrieve in JavaScript through the following code:
var value1 = document.getElementById("value of an element in the form").value;
var value2 = document.getElementById("value of an element in the form").value;
etc
My main question pertains to performing a POST request via a JavaScript Ajax call. How can I merge all these distinct values into a single entity that could be later accessed and assigned to a POJO (Plain Old Java Object) by utilizing setter methods within the servlet? Due to project limitations, I am unable to incorporate JSON or external libraries like Jersey. Any guidance on this matter would be greatly appreciated.