import org.jdom.Document;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;
request.setCharacterEncoding("gb2312");
response.setContentType("text/xml;charset=gb2312");
response.setHeader("Pragma","No-cache");
response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires",0);
/*获取部门子树时传递参数dept_parent;初始化部门树时获取员工归属部门*/
String dept_parent=(String) request.getParameter("deptParent");
String operNo=(String) request.getParameter("operNo");
DeptTree deptTree=new DeptTree();
if(dept_parent!=null){
deptTree.setdeptParent(dept_parent);
}
getDeptTreeDto().setDeptTree(deptTree);
getCreateDpTreeXmlHTMLServiceDelegate().initDeptTree(getDeptTreeDto(),
getUserDto());
Document doc = getDeptTreeDto().getDoc();
//从服务器端返回目标文档
XMLOutputter outp = new XMLOutputter(Format.getPrettyFormat().setEncoding("gb2312"));
pw = response.getWriter();
outp.output(doc,pw);