java類與jsp文件獲取項目物理路徑

jsp獲取項目的物理路徑:  String path = application.getRealPath("/"); 效果如下: java類文件獲取物理路徑: ServletContext context = ServletActionContext.getServletContext(); String path = context.getRealPath("/*");
相關文章
相關標籤/搜索