jsp

jsp页面头部:

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

 jsp页面路劲问题:

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href="<%=basePath%>">

 

你可能感兴趣的:(java,jsp)