今天余老师讲了路径path的问题,要求统一使用绝对路径,并在jsp文件中加入一下代码:
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<base href="<%=basePath%>" />
转载于:https://blog.51cto.com/ck9750/1153768