获取当前web站点路径

[java]  view plain  copy
  1. //获取当前we站点的路径(在做上传下载的时候,可以使用)
  2. private String getWebpath (HttpServletRequest request){
  3. //return request.getSession().getServletContext().getRealPath();
  4. //return request.getServletContext().getRealPath("");
  5. return request.getRealPath();
  6. }

你可能感兴趣的:(Web,获取,下载,路径,站点)