basepath位置及使用

 <%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<% String path=request.getContextPath();
   String basepath=request.getScheme()+"://"+request.getServerName()+
   request.getServerPort()+path+"/";%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%@ include file="../includeHead.jsp"%> 
<head> 
<base herf="<%=basepath%>"/>         
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>历史清单查询</title>

</head>

basepath写在约束之前,base标签写在head中,截图如下:

basepath位置及使用