ITeye博客

Struts获取Web应用根目录

jis117 · 2014-08-15 09:14 · struts · 编程语言 · Markdown


ActionContext ac = ActionContext.getContext();
ServletContext sc = (ServletContext) ac.get(ServletActionContext.SERVLET_CONTEXT);
String temp = ServletActionContext.getRequest().getRealPath("/");

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。