2010年2月5日 星期五

取得Web Site在Server端真正的路徑

protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
   ...
   ServletContext context = getServletContext();
   String path = context.getRealPath("/");
   ...
}

沒有留言:

張貼留言