• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with creating a File

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have just started to work with Java Web Services. I implemented a service that creates just a black image and a web browser client, where you can input a path.
But actually it does not work. After submitting the targetpath I get the following error msg. in log File.
java.security.AccessControlException: access denied (java.io.FilePermission D:\temp\test.bmp delete)

I know that there is a security problem, when web services want to craete files. But how can I correct the problem?

Thank you for helping me,

David
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you running the server with a SecurityManager? Then you would need to adjust its Policy to allow you to create files. Alternatively, create the file in the location you get from File.createTempFile.
 
reply
    Bookmark Topic Watch Topic
  • New Topic