baseURL的问题
1
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
// 获得项目完全路径(假设你的项目叫MyApp,那么获得到的地址就是http://localhost:8080/MyApp/):
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
2
<base href=" <%=basePath%>">