代码片断:判断某个请求是否是ajax请求 Leave a Comment / Java / April 11, 2014 April 11, 2014 public static boolean isAjaxRequest(HttpServletRequest request) { return "XMLHttpRequest".equals(request.getHeader("X-Requested-With")); }