I want a servlet to process GET request and return a string.
Very simplified version is:
public class handlequery extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException
    {
        response.setContentType("text");
        PrintWriter out = response.getWriter();
        out.println("videoid");
    }
}
But the return data (which I check as follows) in the callback  is - object XML Document.
$.get("handleq", function(data, textStatus) {
    alert("Done, with the following status: " + textStatus + "." +
          " Here is the response: " + data);
});
Can someone tell me why data is object XML Document when I should get videoid?
 
     
     
    