...
void doget.....
response.setContentType("application/xml");//设置格式
PrintWriter out = response.getWriter();
String agentId = request.getParameter("AgentID");
MonitorService monitorService = ServiceFactory.getService(MonitorService.class);
out.println(monitorService.getRestCountByAgentId(agentId));//返回
out.flush();
out.close();