标签:etc oca lin 执行方法 Servle user ext 执行 let
先在拦截器里执行方法看一看结果
System.out.println("getRequestURI:"+request.getRequestURI()); System.out.println("getRequestURL:"+request.getRequestURL()); System.out.println("getContextPath:"+request.getContextPath()); System.out.println("getServletPath:"+request.getServletPath());
结果:
getRequestURI:/user/index getRequestURL:http://localhost/user/index getContextPath: getServletPath:/user/index
总结:
request.getRequestURL()和request.getRequestURI()
标签:etc oca lin 执行方法 Servle user ext 执行 let
原文地址:https://www.cnblogs.com/yuqingya/p/13224035.html