【web】之获取服务器tomcat下webapps目录路径
String realPath = req.getServletContext().getRealPath("/");
String realPathParent=(new File(realPath1)).getParent();
获取的realPath->tomcat/webapps/zz
获取的realPathParent->tomcat/webapps
全文完,感谢您的耐心阅读~
欢迎大家关注我的公众号
String realPath = req.getServletContext().getRealPath("/");
String realPathParent=(new File(realPath1)).getParent();
获取的realPath->tomcat/webapps/zz
获取的realPathParent->tomcat/webapps
全文完,感谢您的耐心阅读~
欢迎大家关注我的公众号