标签:style blog http io color sp div on log
1.获取项目根路径:
HttpServletRequest request = ServletActionContext.getRequest(); //获取物理根路径 String basePath = request.getSession().getServletContext().getRealPath("/"); //获取网络根路径 String baseUrl = request.getScheme()+":"+request.getServerName()+":"+request.getServerPort()+request.getContextPath(); //获取web相对路径 String rootPath = request.getContextPath();
标签:style blog http io color sp div on log
原文地址:http://www.cnblogs.com/thinksasa/p/4078133.html