Michael
Michael

Reputation: 1397

Can't access file in app engine java

I realize similar questions have been asked and answered but doing everything that is mentioned there I can't seem to get this to work.

in appengine-web. xml file I have

<resource-files>
  <include path="war/WEB-INF/StaticFiles/*" />
</resource-files>

I have a Test.txt file in the StaticFiles/ that I want to read so I

BufferedReader reader = new BufferedReader(new FileReader("war/WEB-INF/StaticFiles/Test.txt"));

I get a FileNotFoundException. If I change the path of the FileReader to say /WEB-INF/StaticFiles/Test.txt" I get a can't access denied error.

What am I doing wrong?

Upvotes: 1

Views: 695

Answers (1)

Dave W. Smith
Dave W. Smith

Reputation: 24966

Try leaving war/ off of both parts of that.

Upvotes: 4

Related Questions