JSP中的普通路径写法

<%

  String path = request.getContextPath();

     String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/" 

%>

输出:

<%=basePath%>

原文地址:https://www.cnblogs.com/lingtiaoti/p/9509284.html