pageContext.request.contextPath 和 request.getContextPath()

作用是取出部署的应用程序名,这样不管如何部署,所用路径都是正确的。

El表达式的写法:${pageContext.request.contextPath}

jsp的写法:<%=request.getContextPath()%>

原文地址:https://www.cnblogs.com/itliucheng/p/4466499.html