摘要: 利用SVN信息制作升級(jí)包小工具 閱讀全文
Java
摘要: (非原創(chuàng))
The method getRealPath(String) from the type ServletRequest is deprecated
出現(xiàn)該警告,該方法已經(jīng)不能使用了
Deprecated. As of Version 2.1 of the Java Servlet API, use ServletContext.getRealPath(java.lang.String) instead.
可以使用下面的方法來替代上面的方法
request.getSession().getServletContext().getRealPath() 得到站點(diǎn)的絕對(duì)地址
在servlet或者struts中還可以這樣:
this.getServletContext().getRealPath("/");
this.getServlet().getServletContext().getRealPath("/");
閱讀全文
The method getRealPath(String) from the type ServletRequest is deprecated
出現(xiàn)該警告,該方法已經(jīng)不能使用了
Deprecated. As of Version 2.1 of the Java Servlet API, use ServletContext.getRealPath(java.lang.String) instead.
可以使用下面的方法來替代上面的方法
request.getSession().getServletContext().getRealPath() 得到站點(diǎn)的絕對(duì)地址
在servlet或者struts中還可以這樣:
this.getServletContext().getRealPath("/");
this.getServlet().getServletContext().getRealPath("/");
閱讀全文