首页 > Web开发 > 详细

jsp笔记----jsp常用的的获取项目的根路径

时间:2017-09-18 11:59:16      阅读:261      评论:0      收藏:0      [点我收藏+]
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>

使用

<%=basePath %>

 


技术分享

jsp笔记----jsp常用的的获取项目的根路径

原文:http://www.cnblogs.com/tk55/p/7542310.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!