ActionContext ac = ActionContext.getContext();
ServletContext sc = (ServletContext) ac.get(ServletActionContext.SERVLET_CONTEXT);
String path = sc.getRealPath("/");
ServletContext sc = (ServletContext) ac.get(ServletActionContext.SERVLET_CONTEXT);
String path = sc.getRealPath("/");
获取Servlet上下文路径的ActionContext使用
8326

被折叠的 条评论
为什么被折叠?



