@RequestMapping("/index")
public String index(ModelMap modelMap,HttpServletRequest req) throws IOException{
System.out.println(req.getSession().getServletContext().getRealPath("/"));
return "/admin/config/index";
}
我想要的是获取路径E:\eclipse-workspace\project001,project001是我的项目名称
eclipse-workspace是eclipse的项目命名空间
运行上面代码:
E:\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\project001\
却打印的是这样的。
添加回答
举报
0/150
提交
取消
