basePath

<html>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<head>
<meta http-equiv="Refresh" content="0; URL=<%=basePath%>admin/login">
</head>
<body>
</body>
</html>
原文地址:https://www.cnblogs.com/CESC4/p/7325829.html