1. 首页
  2. 数据库
  3. 其它
  4. jsp文件绝对路径的设置方法

jsp文件绝对路径的设置方法

上传者: 2021-01-16 17:39:09上传 PDF文件 26.72KB 热度 10次
代码如下: <% String path = request.getContextPath(); String basePath = request.getScheme() + “://” + request.getServerName() + “:” + request.getServerPort() + path + “/”;//返回形式http://localhost:8080/upload/ > 调用: 代码如下: <%=basePath%> 在js代码里也可以直接用 您可能感兴趣的文章:JSP对URL链
下载地址
用户评论