google app engine - java.security.AccessControlException: File accessible thru browser but not within same server -
so not repeat myself much, please refer serve static image along side java google-enpoint api.
as can see referenced link, able view image through url. however, when trying read filenames using similar code to
public void listfilesforfolder(final file folder) { (final file fileentry : folder.listfiles()) { if (fileentry.isdirectory()) { listfilesforfolder(fileentry); } else { system.out.println(fileentry.getname()); } } } final file folder = new file("/home/you/desktop"); listfilesforfolder(folder);
i security exception
java.security.accesscontrolexception: access denied ("java.io.filepermission" "/myimages" "read")
does know fix? how come call thru browser show image , yet call within server throws exception? find strange.
if you've configured file "static" resource, it'll served separate pool of servers optimized serving static content. consequence file isn't available opened app. "resource" files available app open , read.
that's documented here.
you'll need use relative path when opening resource. you've shown absolute path above.
Comments
Post a Comment