Request获取项目决定路径
2016-07-25 17:00
471 查看
获取jsp的项目绝对路径。
String path = java.net.URLDecoder.decode(request.getSession().getServletContext().getRealPath("/"),"UTF-8");
为了解决目录中有空格的问题。
需要使用如下进行转下
path
= java.net.URLDecoder.decode(configPath,"utf-8");
String path = java.net.URLDecoder.decode(request.getSession().getServletContext().getRealPath("/"),"UTF-8");
为了解决目录中有空格的问题。
需要使用如下进行转下
path
= java.net.URLDecoder.decode(configPath,"utf-8");
相关文章推荐
- POJ 3071 Football—概率DP-conquer sea博客
- ServletActionContext.getRequest().getSession() 和 ActionContext.getContext().getSession()
- HBuilder标题栏如何穿标题呢
- 修改UITextfield的Placeholder字体的颜色
- HDU 5749 Colmerauer
- poj 2127 Greatest Common Increasing Subsequence
- 【IOS】UITableView固定headerView的方案
- Volley学习(三)ImageRequest、ImageLoader、NetworkImageView源码简读
- UI基础_自定义等高Cell_storyboard封装_版本_有GIF_源代码
- 并发编程之Operation Queue和GCD
- UI基础_自定义等高Cell_xib封装_版本_有GIF_源代码
- Distinct subsequences
- HBuilder底部选项卡的子页面切换效果
- IMS Modify Call (2) receive request 收到视频升级请求
- WEB-INF\classes 为空 The value for the useBean class attribute xxx is invalid
- UICollectionView Class Reference
- 论文阅读:Things, Trouble, Trust: On Building Trust in IoT Systems
- IMS Modify Call (1) send request 发出升级视频请求
- Develop>API Guides>Introduction>Device Compatibility 中文翻译
- UI系统技巧——制作血条与雷达图