I understand that you cannot access java.io.File from a GAE app (its restricted). However, I remember reading somewhere that it’s possible to have access to anything in your WAR (perhaps anything under WEB-INF/?).
So I ask: is there a way to access a file inside your WAR from a GAE app? In other words, if I deploy a WAR with the following structure:
MyApp/
WEB-INF/
web.xml
appengine-web.xml
...etc.
my-special-config.xml
Is there any way for me to read my-special-config.xml from inside my GAE app? If so, how and with what classes? I see in the GAE SDK that there is an AppEngineFile, and wondering if I can use this. Thanks in advance.
Check out the dev guide here:
Sample code to read resource file under classpath in POJO class:
Sample code to read resource file under classpath in Servlet class: