String myJrxmlFile = this.getServletContext().getRealPath(myJrxmlWebPath);
getServletContext() : Returns a reference to the ServletContext in which the caller is executing.
getRealPath(java.lang.String path)
Returns a String containing the real path for a given virtual path.
這樣可以輕易的把我們要用的檔案拿來使用.
沒有留言:
張貼留言