javaweb项目中获取项目名称

request.getServletContext().getContextPath()

增加项目名称是test。那么上面的结果就是/test

原文地址:https://www.cnblogs.com/yangykaifa/p/7110635.html