That won't help out.  You will still get the access error when you
actually try and write the file. You can persist into a datastore. If
I'm outside the framework i.e. JSF, then I have no problems persisting
it as a file.

On Apr 28, 12:03 pm, "Jason (Google)" <apija...@google.com> wrote:
> You may need to use ServletFileUpload instead:
>
> http://shogi-software.blogspot.com/2009/04/google-app-engine-and-file...
>
> - Jason
>
> On Sat, Apr 25, 2009 at 5:13 PM, Jun <junshen2...@gmail.com> wrote:
>
> > Hi,
>
> > I am trying to upload a file with the following code.
>
> > DiskFileUpload fu = new DiskFileUpload();
> > fu.setSizeMax(-1);
> > List fileItems = fu.parseRequest(request);
> > Iterator i = fileItems.iterator();
>
> > But I got the following error.
>
> >  java.security.AccessControlException: access denied
> > (java.io.FilePermission C:\Users\Jun\AppData\Local\Temp
> > \upload_00000000.tmp delete)
> >     at java.security.AccessControlContext.checkPermission
> > (AccessControlContext.java:264)
> >     at java.security.AccessController.checkPermission
> > (AccessController.java:427)
> >     at java.lang.SecurityManager.checkPermission(SecurityManager.java:
> > 532)
> >     at com.google.appengine.tools.development.DevAppServerFactory
> > $CustomSecurityManager.checkPermission(DevAppServerFactory.java:76)
> >     at java.lang.SecurityManager.checkDelete(SecurityManager.java:
> > 990)
> >     at java.io.File.deleteOnExit(File.java:901)
> >     at org.apache.commons.fileupload.DefaultFileItem.getTempFile
> > (DefaultFileItem.java:620)
> >     at org.apache.commons.fileupload.DefaultFileItem.getOutputStream
> > (DefaultFileItem.java:557)
> >     at org.apache.commons.fileupload.FileUploadBase.parseRequest
> > (FileUploadBase.java:391)
> >     at com.strongtech.iii.web.AddItemController.handleRequest
> > (AddItemController.java:69)
> >     at
> > org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle
> > (SimpleControllerHandlerAdapter.java:44)
> >     at org.springframework.web.servlet.DispatcherServlet.doDispatch
> > (DispatcherServlet.java:684)
> >     at org.springframework.web.servlet.DispatcherServlet.doService
> > (DispatcherServlet.java:625)
> >     at org.springframework.web.servlet.FrameworkServlet.processRequest
> > (FrameworkServlet.java:392)
> >     at org.springframework.web.servlet.FrameworkServlet.doPost
> > (FrameworkServlet.java:357)
> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
> >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> >     at org.mortbay.jetty.servlet.ServletHolder.handle
> > (ServletHolder.java:487)
> >     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1093)
> >     at
> > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
> > (TransactionCleanupFilter.java:43)
> >     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1084)
> >     at org.mortbay.jetty.servlet.ServletHandler.handle
> > (ServletHandler.java:360)
> >     at org.mortbay.jetty.security.SecurityHandler.handle
> > (SecurityHandler.java:216)
> >     at org.mortbay.jetty.servlet.SessionHandler.handle
> > (SessionHandler.java:181
>
> > Can anybody give me some idea how to solve the problem?
>
> > Thanks,
>
> > Jun
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to