使用jstl方式替换服务器请求地址

<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>

原文地址:https://www.cnblogs.com/yanlong300/p/contextPath.html