关于request.getServletPath(),request.getContextPath()的总结

1. getServletPath():获取能够与“url-pattern”中匹配的路径,注意是完全匹配的部分,*的部分不包括。 

2.getContextPath():获取项目的根路径

原文地址:https://www.cnblogs.com/curedfisher/p/11683870.html