struts+ajax

action:
public PersonVO getPersonById(){
String strId = request.getParameter("editId");
pb = new PersonBean();
pvo = pb.getPersonById(Long.parseLong(strId));
return pvo;
}
PersonVO 是一个实体里面包涵如:姓名、年龄、性别……等等;
js:只是ajax的一段回调函数
function handleHttpResponse(){
 if(http.readyState == 4){
 if(http.status == 200){
   if(http.responseText!=""){
var=http.responseText;
}else{
alert("你所请求的页面发生异常,没有发现所请求的目标!");
}
  }
}
}
但是这个var只是实体一个字符串;我想把var表示为一个实体对象;想在页面上这样表达:
document.getElementById('personNames').value=var.personName;
那位帮我解决下

可以利用json的形式将数据得到,然后直接var.personName;