ajax and servlet
- by kawtousse
Hi everyone
I am using ajax to send a value to a servlet with that parameter value I must display a table HTML.
from my JSP when sending with following:
xhr.open("POST","ServletImputOPC",true);
xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
var unit =document.getElementById('unit').value;
xhr.send("t[0]="+t[0]);
it returns the clause in my servlet correctly witch is:
parameter received:Nameof my parameter.
that is improve that the servlet receive the parameter. But when using it in the servlet it return a null value.
So the problem that the servlet return the parameter received but did not able to use it.
What should I do to resolve it.
Many thinks.