wood burning stoves 2.0*
The moose likes Web Services and the fly likes Problem with creating a File Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Problem with creating a File" Watch "Problem with creating a File" New topic

Problem with creating a File


Joined: Dec 20, 2005
Posts: 1

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,

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 41095
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.

Ping & DNS - my free Android networking tools app
I agree. Here's the link: http://aspose.com/file-tools
subject: Problem with creating a File
Similar Threads
Problem While Deploying the WebService
iPhone consuming a secured Web Service
SOAP implementation using SAAJ
auto redeploy web service after tomcat restart
deploying Axis2 Webservices in JBOSS