首页 > 编程 > JSP > 正文

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

2019-11-02 15:04:47
字体:
来源:转载
供稿:网友

 这篇文章主要介绍了jsp文件绝对路径的设置方法,需要的朋友可以参考下

代码如下:
4567电影网[www.aikan.tv/special/4567dianyingwang/]
<% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";//返回形式http://localhost:8080/upload/ >  调用:  代码如下:<%=basePath%>  在js代码里也可以直接用  
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表