web过滤器中获取请求的参数(content-type:multipart/form-data)

http://www.cnblogs.com/springlight/p/6208908.html

https://www.cnblogs.com/hdwpdx/p/5333943.html

1.前言:

  1.1 在使用springMVC中,需要在过滤器中获取请求中的参数token,根据token判断请求是否合法;

  1.2 通过requst.getParameter(key)方法获得参数值;

    这种方法有缺陷:它只能获取  POST 提交方式中的Content-Type: application/x-www-form-urlencoded;

        HttpServletRequest request= (HttpServletRequest) req;
        String param = request.getParameter("param");

猜你喜欢

转载自www.cnblogs.com/zuochanzi/p/9396944.html
今日推荐