respond to Tomcat Users List
To: [EMAIL PROTECTED]
cc:
Subject:Reading from files in servlet from Tomcat-4.0.4
Hi all,
I am trying to read from a file : filename
Where should i put this file in tomcat 4.0.4 directory structure?
I tried putting the file
: Reading from files in servlet from Tomcat-4.0.4
Hi,
you need to put the file in /TOMCAT_HOME/bin
I had the same problem and first I made a simple servlet code that
writes
a txt file, then I look for that file and Tomcat put it in
/TOMCAT_HOME/bin
regards
Alex Tomita
khozaima shakir [EMAIL
Hi all,
I am trying to read from a file : filename
Where should i put this file in tomcat 4.0.4 directory structure?
I tried putting the file in directories:
webapps/ROOT, webapps/ROOT/WEB-INF, webapps/ROOT/WEB-INF/classes in each
instance i get the error message
The system cannot find the file
Your best bet is to put them in webapps/WEBAPP/bob.txt
Then read them using servletContext.getResourceAsStream(/bob.txt);
This will still work when the application is packaged up as a WAR file.
khozaima shakir wrote:
Hi all,
I am trying to read from a file : filename
Where should i put