1
2
3
4
|
HttpServletRequest request = (HttpServletRequest) req;
ServletInputStream is = req.getInputStream();
int
length=req.getContentLength();
byte
[] ba =
new
byte
[length];
|
以上代碼在doFilter中讀取了post請求的內容,以後發現servlet已經沒法讀取該內容,由於ServletInputStream不支持mark,無法回頭
post