`
lian
  • 浏览: 55329 次
  • 性别: Icon_minigender_1
  • 来自: 洛阳
社区版块
存档分类
最新评论

SSH中 Servlet init方法 里面获取到项目根目录

阅读更多
 public void init(ServletConfig config) throws ServletException {
	super.init(config);
	try {
	   String basePath = org.springframework.web.util.WebUtils.getRealPath(
		    this.getServletContext(), "/");
	   
	} catch (FileNotFoundException e) {
	    // TODO Auto-generated catch block
	    e.printStackTrace();
	}
    }
分享到:
评论
1 楼 macleo 2012-07-05  
恋姐, 

相关推荐

Global site tag (gtag.js) - Google Analytics