在jsp中获取当前项目的根路径:

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

可以使用${basePath}获取。

posted on 2017-09-20 17:00  aswq2009  阅读(295)  评论(0编辑  收藏  举报