tdesbarres
09-26-2007, 01:52 PM
I am using the XMLHttpRequest object to call a URL webproject/Skill.jsp
function loadXMLDoc(url) {
var req = new XMLHttpRequest();
req.onreadystatechange = processReqChange;
req.open("GET", url, true);
req.send(null);
}
I was hoping to have the responseText come back but instead I am having the responseXML come back.
Here is the debug of the OL project
rocessReqChange: req.readyState 1
processReqChange: req.readyState 4
undefined
arg = «lz.XMLHttpRequest#6»
request.status 200
request.responseText:
request.responseXML: «lz.dataset#7| <localdata>


hello world
</localdata>»
request.getAllResponseaders: «lz.params#8| Date=Wed, 26 Sep 2007 21:45:08 GMT&Set-Cookie=JSESSIONID=299C6B2F6CCE7F8393D8BB595CEC1943 ; Path=/ResumeViewerWeb&Server=Apache-Coyote/1.1»
Here is what the .jsp file is doing:
<%@page language="java" contentType="text/plain; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%
response.setContentType("text/plain");
out.print("hello world");
out.flush();
%>
any idea as to how I can get hello world to come back in the responseText attribute?
Thanks
function loadXMLDoc(url) {
var req = new XMLHttpRequest();
req.onreadystatechange = processReqChange;
req.open("GET", url, true);
req.send(null);
}
I was hoping to have the responseText come back but instead I am having the responseXML come back.
Here is the debug of the OL project
rocessReqChange: req.readyState 1
processReqChange: req.readyState 4
undefined
arg = «lz.XMLHttpRequest#6»
request.status 200
request.responseText:
request.responseXML: «lz.dataset#7| <localdata>


hello world
</localdata>»
request.getAllResponseaders: «lz.params#8| Date=Wed, 26 Sep 2007 21:45:08 GMT&Set-Cookie=JSESSIONID=299C6B2F6CCE7F8393D8BB595CEC1943 ; Path=/ResumeViewerWeb&Server=Apache-Coyote/1.1»
Here is what the .jsp file is doing:
<%@page language="java" contentType="text/plain; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%
response.setContentType("text/plain");
out.print("hello world");
out.flush();
%>
any idea as to how I can get hello world to come back in the responseText attribute?
Thanks