On Thu, 1 Mar 2001, Brett G. Palmer wrote:
What is the best way to read a file from a Context in Tomcat? I know I can
get the context path from the "getContextPath()" method, but most file
stream APIs require a full path. There most be a clean way to accomplish
this without hard coding any
Easy.. you were close to the magic incantation:
s.getServletContext().getRealPath("/WEB-INF/myfiles/xyz.dat");
Mike
Message-ID: [EMAIL PROTECTED]
On Thu, 1 Mar 2001, Brett G. Palmer wrote:
What is the best way to read a file from a Context in Tomcat? I know I
can
get the context path
What is the best way to read a file from a Context in Tomcat? I know I can
get the context path from the "getContextPath()" method, but most file
stream APIs require a full path. There most be a clean way to accomplish
this without hard coding any directory path info.
Any suggestions would be