<script src="${pageContext.request.contextPath}/assets/js/jquery-2.1.4.js"></script>
也可使用jstl方式
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>
<script src="${path}/assets/js/jquery-2.1.4.js"></script>
针对MVC,需要配置静态资源过滤
<!-- 静态资源跳过 location为资源目录-->
<mvc:resources mapping="/assets/**" location="/WEB-INF/assets/"/>