Re: Reading a file from a Context

2001-03-02 Thread Kevin Sangeelee
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

Re: Reading a file from a Context

2001-03-02 Thread Mike Slinn
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

Reading a file from a Context

2001-03-01 Thread Brett G. Palmer
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