因为专注,所以专业

我的Java Blog

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  21 随笔 :: 30 文章 :: 6 评论 :: 0 Trackbacks

Java

     摘要: 利用SVN信息制作升级包小工具  阅读全文
posted @ 2012-06-01 16:06 kevin.zhan 阅读(271) | 评论 (0)  编辑

     摘要: (非原创)
The method getRealPath(String) from the type ServletRequest is deprecated

出现该警告,该方法已经不能使用了

Deprecated. As of Version 2.1 of the Java Servlet API, use ServletContext.getRealPath(java.lang.String) instead.

可以使用下面的方法来替代上面的方法

request.getSession().getServletContext().getRealPath() 得到站点的绝对地址

在servlet或者struts中还可以这样:

this.getServletContext().getRealPath("/");

this.getServlet().getServletContext().getRealPath("/");
  阅读全文
posted @ 2010-12-30 11:04 kevin.zhan 阅读(6678) | 评论 (0)  编辑

posted @ 2009-04-20 17:47 kevin.zhan 阅读(720) | 评论 (0)  编辑

posted @ 2008-11-17 18:42 kevin.zhan 阅读(4698) | 评论 (0)  编辑

posted @ 2008-05-12 15:22 kevin.zhan 阅读(462) | 评论 (0)  编辑