request.getRealPath("") 这个方法已经不推荐使用了,那代替它的是什么方法
Deprecated. As of Version 2.1 of the Java Servlet API, use ServletContext.getRealPath(java.lang.String) instead.
request.getSession().getServletContext().getRealPath() 得到站点的绝对地址
Logo

讨论HarmonyOS开发技术,专注于API与组件、DevEco Studio、测试、元服务和应用上架分发等。

更多推荐