request.getRealPath()的替代方法

xiaoxiao2026-08-19  21

获得要路径的几种方法

1,request.getRealPath("/");这个方法已不推荐用

2,在Servlet 里用this.getServletContect().getRealPath("/");获得要路径。

3,struts里用this.getServlet().getServletContext().getRealPath("/")获得要路径。

相关资源:敏捷开发V1.0.pptx
转载请注明原文地址: https://www.6miu.com/read-5051485.html

最新回复(0)