采用绝对路径方式解决路径问题---MyEclipse提供的解决方案

来源:互联网 发布:表情包制作软件 编辑:程序博客网 时间:2024/06/11 08:18

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

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">

原创粉丝点击