ServletInputStream ris;
+ ris = request.getInputStream();
+ StringBuilder content = new StringBuilder();
+ byte[] b = new byte[1024];
+ int lens = -1;
+ while ((lens = ris.read(b)) > 0) {
+ content.append(new String(b, 0, lens));
+ }
+ String strcont = content.toString();// 内容
+ System.out.println("SessionFilter doFilter body " + strcont);
【转】servlet 输出 http 请求正文
猜你喜欢
转载自blog.csdn.net/wuzhong8809/article/details/85092487
今日推荐
周排行