- WIN-INF路径下引用:
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
- webapp路径下引用:
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/user.css"/>