java如何区分是form表单请求,还是ajax请求

      requestType = request.getHeader("X-Requested-With");
                if(requestType==null){//form表单请求
                 
                }else{//ajax请求
                   
                }

原文地址:https://www.cnblogs.com/guoyansi19900907/p/6238794.html