I tried a little. I put the file(names.txt) in /WEB-INF directly
The following are sources that I tested. String FileName = "names.txt"; File file = new File(FileName); BufferedReader bufferedReader = new BufferedReader(new FileReader (file)); The processing seems in my test for normality. I might not correctly understand the content of the question or There is a possibility it is not in the cause for the source code not to be able to read a file but in the cause with the environment, too. Please Confirm. thanks. > Hello, > > I have tried this but I always get a > java.security.AccessControlException: access denied > (java.io.FilePermission /names.txt read) > > Anyone know how to resolve this? > > Thanks, > > Finbarr > > On Jan 7, 3:32 am, m seleron <[email protected]> wrote: > > > Hi, > > > It might be solved by this though is not a direct answer. > > > Follow this > > thread:http://groups.google.co.jp/group/google-appengine-java/browse_thread/... > > > Please Try. > > thanks. > > > > Hello, > > > > I have recently started using App Engine for a project I am working > > > on, and I have a simple question. > > > > I have a file in the war/WEB-INF directory of my app <filename.txt>. > > > When I try BufferedReader b = new BufferedReader(new FileReader(new > > > File(<filename.txt>))); I get a FileNotFoundException. > > > > What path should I use when trying to access files in the war/WEB-INF > > > directory? I have tried what seem to me to be the obvious ones and I > > > have read the faq on this (which just tells you to put files in that > > > directory). > > > > Thanks, > > > > Finbarr > >
-- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
