[appengine-java] Re: File Access on App Engine

2009-12-09 Thread andy.booth
Use a relative path, not an absolute path. So remove the forward slash
prefix, to just FileInputStream(test.xml). So a file located in /
projectfolder/war/data/anothertest.xml would be accessed using
FileInputStream(data/anothertest.xml).

Andy


On Dec 8, 10:49 pm, mattkrae34 matt.krae...@gmail.com wrote:
 I'm using 1.2.8 SDK and on both local and the app engine I get the
 following exception:

 java.security.AccessControlException: access denied
 (java.io.FilePermission file.xml read)

 When I ever I try to open a FileInputStream

 XMLEventReader r = factory.createXMLEventReader(new FileInputStream(/
 test.xml));

 My appengine-web.xml contains the following:

         static-files
         include path=/**.xml /
     /static-files

         resource-files
         include path=/**.xml /
     /resource-files

 The file is located in the WEB-INF directory.

--

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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.




[appengine-java] Re: File Access on App Engine

2009-12-09 Thread mattkrae34
Using the relative path worked.  I thought I had tried that

Thanks

On Dec 9, 3:51 am, andy.booth andy.booth...@googlemail.com wrote:
 Use a relative path, not an absolute path. So remove the forward slash
 prefix, to just FileInputStream(test.xml). So a file located in /
 projectfolder/war/data/anothertest.xml would be accessed using
 FileInputStream(data/anothertest.xml).

 Andy

 On Dec 8, 10:49 pm, mattkrae34 matt.krae...@gmail.com wrote:



  I'm using 1.2.8 SDK and on both local and the app engine I get the
  following exception:

  java.security.AccessControlException: access denied
  (java.io.FilePermission file.xml read)

  When I ever I try to open a FileInputStream

  XMLEventReader r = factory.createXMLEventReader(new FileInputStream(/
  test.xml));

  My appengine-web.xml contains the following:

          static-files
          include path=/**.xml /
      /static-files

          resource-files
          include path=/**.xml /
      /resource-files

  The file is located in the WEB-INF directory.

--

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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.




[appengine-java] Re: File Access on App Engine

2009-12-08 Thread m seleron
Hi,

Follow this thread.

http://groups.google.com/group/google-appengine-java/browse_thread/thread/ef91a0e8c32c576e/3358e5877c6ef30e?lnk=gstq=FileInputStream#3358e5877c6ef30e

thanks.


On 12月9日, 午前7:49, mattkrae34 matt.krae...@gmail.com wrote:
 I'm using 1.2.8 SDK and on both local and the app engine I get the
 following exception:

 java.security.AccessControlException: access denied
 (java.io.FilePermission file.xml read)

 When I ever I try to open a FileInputStream

 XMLEventReader r = factory.createXMLEventReader(new FileInputStream(/
 test.xml));

 My appengine-web.xml contains the following:

         static-files
         include path=/**.xml /
     /static-files

         resource-files
         include path=/**.xml /
     /resource-files

 The file is located in the WEB-INF directory.

--

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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.