in my website there’s a certain page for administration. when you load the page, it suppose to parse a csv file. I encountered with two problems:
- where should the file be located. I don’t want it to be on
publicbecause then anyone could read it. - virtually, what the page does is reading the csv file using
FileReaderclass. what should be the path to the file?
thanks!
If you don’t want to deploy your CSV you could store it in the home folder:
Use the Java class File: http://docs.oracle.com/javase/6/docs/api/java/io/File.html
To read a small file you can use apache fileutils:
http://commons.apache.org/io/api-1.4/org/apache/commons/io/FileUtils.html
(may be add a dependency)