WebService XFire获得访问服务端的客户端IP

		String ip= null;
		try {
			HttpServletRequest request = XFireServletController.getRequest();
		    ip = request.getRemoteAddr();
			System.out.println("访问的客户端 IP 是:"+ ip);
		} catch (Exception e) {

				System.out.println("无法获取HttpServletRequest");
				e.printStackTrace();

		}


 

你可能感兴趣的:(WebService XFire获得访问服务端的客户端IP)