I am making an ajax request to my servlet and the servelt responds with this code:
resp.getOutputStream().print("t")
In the ajax onreadystate function I am doing
if(xmlhttp.responseText.equals("t")){//...}
But it is not entering into the if statement. Why is it so?