public static void main(String[] args){
		try{
//			String url = "http://183.194.128.28:7001/maximo/mobile/test/login?username=yaorui&password=ABC";
//			String url1 = "http://183.194.128.28:7001/maximo/mobile/test/desc";
			String url = "http://localhost/zt/rest/user/loginForGet?account=foo@example.com&password=hello";
			String url1 = "http://localhost/zt/rest/user/loginForGet?account=foo@example.com&password=hello";
			
			DefaultHttpClient httpClient = new DefaultHttpClient();
			HttpGet httpGet = new HttpGet(url);
			HttpResponse response = httpClient.execute(httpGet);
			CookieStore cookie = httpClient.getCookieStore();
			
			System.out.println("Login form get: " + response.getStatusLine());
			
			HttpEntity entity = response.getEntity();
			System.out.println("login content: " + EntityUtils.toString(entity, "utf-8"));

            System.out.println("login Initial set of cookies:");
            List<Cookie> cookies = httpClient.getCookieStore().getCookies();
            if (cookies.isEmpty()) {
                System.out.println("None");
            } else {
                for (int i = 0; i < cookies.size(); i++) {
                    System.out.println("- " + cookies.get(i).toString());
                }
            }
            
            System.out.println("\n");
            
            
            httpClient = new DefaultHttpClient();
			httpGet = new HttpGet(url1);
			httpClient.setCookieStore(cookie);
			response = httpClient.execute(httpGet);
			
			 System.out.println("desc form get: " + response.getStatusLine());
			
			entity = response.getEntity();
			System.out.println("desc content: " + EntityUtils.toString(entity, "utf-8"));

            System.out.println("desc Initial set of cookies:");
            cookies = httpClient.getCookieStore().getCookies();
            if (cookies.isEmpty()) {
                System.out.println("None");
            } else {
                for (int i = 0; i < cookies.size(); i++) {
                    System.out.println("- " + cookies.get(i).toString());
                }
            }
			
		}catch(Exception ex){
			ex.printStackTrace();
		}
		
	}