jsp或action中获得url路径
http://localhost:8080/rootWebString path = request.getScheme()
+"://"
+ request.getServerName()
+ ":" + request.getServerPort()
+ request.getContextPath()
String dir = servlet.getServletContext().getRealPath("/temp"); //当前文件夹temp所在路径
页:
[1]