1.首先在jsp页面中写一段神奇的JAVA代码
<% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; %>
2.再base标签中使用
<base href="<%=basePath%>">
1.首先在jsp页面中写一段神奇的JAVA代码
<% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; %>
2.再base标签中使用
<base href="<%=basePath%>">