看API
request.getRealPath("") 这个方法已经不推荐使用了,那代替它的是什么方法
Deprecated. As of Version 2.1 of the Java Servlet API, use ServletContext.getRealPath(java.lang.String) instead.
request.getRealPath("") 这个方法已经不推荐使用了,那代替它的是什么方法
Deprecated. As of Version 2.1 of the Java Servlet API, use ServletContext.getRealPath(java.lang.String) instead.
request.getSession().getServletContext().getRealPath("") 关于废弃方法的问题
个别方法可能在早些版本的JDK中使用良好 但是在你当前的这个版本中不建议使用这个方法了应该会有一个代替它的方法。可能函数内部实现已经有变动。干嘛研究废弃原因,影响开发?!