@SuppressWarnings("rawtypes")
	public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException 
    {
		req.setCharacterEncoding("utf-8");
		resp.setContentType("text/html; charset=utf-8");
		resp.setCharacterEncoding("utf-8");
		String cityName = req.getParameter("city").toString();
		System.out.println("city ԭֵ"+cityName);
//		Բͬòͬı뷽ʽ
		String agent = req.getHeader("USER-AGENT");   
		if (null != agent && -1 != agent.indexOf("MSIE")) {
			cityName = new String(req.getParameter("city").getBytes("GBK"),"GB2312");	
		} 		
		Map dataMap = null;
	
	try {
			dataMap = getWeathercnWeather.getWeather(cityName);  //Weather.com.cnȡ
		} catch (ParserConfigurationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		if(dataMap==null||dataMap.size()==0)
		{
	    	System.out.println("log info:ǰ޷Weather.com.cn ȡݣѡSinaȡ...");
			dataMap = GetSinaWeather.getWeather(cityName);	  //sinaȡ
		}
		System.out.println("system out..."+dataMap.size());
		if(dataMap != null && !dataMap.isEmpty())
		{
			if(req.getParameter("resultFormat")!=null && req.getParameter("resultFormat").toString().equalsIgnoreCase("json"))
			{
			   resp.getWriter().println(ConverUtil.maptoJSON(dataMap));
			   System.out.println(ConverUtil.maptoJSON(dataMap));
			}
			else 
			{
				resp.setContentType("text/xml; charset=utf-8");
				resp.getWriter().println(ConverUtil.maptoXml(dataMap));
				System.out.println(ConverUtil.maptoXml(dataMap));
			}
			
		}		
	}