具体的action 操作如下:
...
String method=req.getParameter("method");
//String id=rf.getId();
String id=req.getParameter("id");
        //res.setContentType("text/xml;charset=UTF-8");
        res.setHeader("Cache-Control","no-cache");
String strSQL="";
        String xml_start="<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
        xml_start+="<selects>";
        String xml_end="</selects>";
        String xml="<select><value>0</value><text>--</text></select>";
DBCPool dbc= new DBCPool();
Connection conn=dbc.getConnection("wy_manager");
Statement stmt=null;
if(conn!=null){
try{
stmt=conn.createStatement();
}catch(SQLException err){
System.out.println(err.getMessage());

}
}
if(method.equals("g1")){
strSQL="select cityID id,city name from city where father="+id;
}else if(method.equals("g1")){
strSQL="select areaID id,area name from area where father="+id;
}
ResultSet rs=null;

try{
rs=stmt.executeQuery(strSQL);
while(rs.next()){
xml +="<select><value>"+rs.getString("id")+"</value><text>"+rs.getString("name")+"</text></select>";
}
}catch(Exception e){
e.printStackTrace();
}
.. String last_xml=xml_start+xml+xml_end;
        try {
         res.getWriter().write(last_xml);        } catch (Exception e1) {
            e1.printStackTrace();
        }
--------------------------------------------------
我将数据存储在 response 中.在校检http_request.status==200,信息可以成功返回 不过在查看request.responseXML.documentElement 的时候 返回来的却是 null.
请各位大侠帮忙看看~!是什么原因~!
是不是 这句有问题:res.getWriter().write(last_xml);请大侠们指点迷津~!