I am uploading HTML5 canvas base64 image over servlet using following JavaScript code
function saveDataURL(a) {
var postData = "canvasData="+a;
var ajax = new XMLHttpRequest();
ajax.open("POST",'uploadPhoto.cgi',true);
ajax.send(postData); }
but on server when i see request.getAttribute(“canvasData”) its give me null value even when i debug java code request shows me null. What code should i write on Java, i have tried decoding Base64 request but as request itself contains nothing any help on code,tutorial much appreciated
Apart from the url encoding set the content type to
application/x-www-form-urlencoded