p132程序代码解析

1.  long before = System.currentTimeMillis();

    ......

    long after = System.currentTimeMillis();

解析:该两句代码规定了一个doFilter()拦截用户请求的过滤范围。  

2. HttpServletRequest hrequest = (HttpServletRequest) request;

解析:HttpServletRequest接口是ServletRequest子接口,HttpServletRequest接口遵循http协议。将请求转换成HttpServletRequest请求。

3. System.out.println("Filter 已经截获到用户的请求的地址: "  + hrequest.getSeryletPath() ); 

解析:输出提示信息,输出截获到用户的请求的地址。

原文地址:https://www.cnblogs.com/hcwys/p/8650489.html